brave-real-browser-mcp-server 2.23.5 → 2.23.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -164,6 +164,18 @@ export class SelfHealingLocators {
|
|
|
164
164
|
catch (error) {
|
|
165
165
|
// Continue to fallbacks
|
|
166
166
|
}
|
|
167
|
+
// 💡 NEW: Try to interpret the selector as direct text content
|
|
168
|
+
// This allows users to pass "Submit" or "Download" and have it work "smoothly"
|
|
169
|
+
if (!primarySelector.includes('[') && !primarySelector.includes('#') && !primarySelector.includes('.')) {
|
|
170
|
+
const textElement = await this.findByText(pageInstance, primarySelector);
|
|
171
|
+
if (textElement) {
|
|
172
|
+
return {
|
|
173
|
+
element: textElement,
|
|
174
|
+
usedSelector: `//*[text()[contains(., "${primarySelector}")]]`,
|
|
175
|
+
strategy: 'implicit-text-match'
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
}
|
|
167
179
|
// Generate and try fallback selectors
|
|
168
180
|
const fallbacks = await this.generateFallbacks(pageInstance, primarySelector, expectedText);
|
|
169
181
|
for (const fallback of fallbacks) {
|
package/dist/tool-definitions.js
CHANGED
|
@@ -149,7 +149,7 @@ export const TOOLS = [
|
|
|
149
149
|
properties: {
|
|
150
150
|
selector: {
|
|
151
151
|
type: 'string',
|
|
152
|
-
description: 'CSS selector of element to click',
|
|
152
|
+
description: 'CSS selector of element to click. Also supports direct text content (e.g., "Download") for AI convenience.',
|
|
153
153
|
},
|
|
154
154
|
waitForNavigation: {
|
|
155
155
|
type: 'boolean',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-browser-mcp-server",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.7",
|
|
4
4
|
"description": "🦁 MCP server for Brave Real Browser - NPM Workspaces Monorepo with anti-detection features, SSE streaming, and LSP compatibility",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "latest",
|
|
52
52
|
"@types/turndown": "latest",
|
|
53
|
-
"brave-real-browser": "^2.4.
|
|
53
|
+
"brave-real-browser": "^2.4.7",
|
|
54
54
|
"turndown": "latest",
|
|
55
55
|
"vscode-languageserver": "^9.0.1",
|
|
56
56
|
"vscode-languageserver-textdocument": "^1.0.12"
|