feat: MCP Browser v3.1.1 - 56+ tools, visual overlays, fixes
- Added 9 new tools: visual overlay, highlight, toast, drag-drop, etc. - Fixed evaluateJS to support function arguments - Fixed hover for non-visible elements - Fixed storage operations with try/catch - Added 10 new wait tools: clickable, element visible, text - Fixed tool name mapping in server.js for MCP protocol - Updated README with 60+ tools documentation - Version bump to 3.1.1
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const browser = require('../browser');
|
||||
|
||||
module.exports = async ({ selector = 'input, textarea, select' }) => {
|
||||
await browser.start();
|
||||
const inputs = await browser.evaluateJS(`
|
||||
(function() {
|
||||
return Array.from(document.querySelectorAll('${selector}')).map(function(el) {
|
||||
return {
|
||||
tag: el.tagName.toLowerCase(),
|
||||
id: el.id || null,
|
||||
name: el.name || null,
|
||||
type: el.type || null,
|
||||
placeholder: el.placeholder || null,
|
||||
value: el.value || '',
|
||||
checked: el.checked || null,
|
||||
required: el.required || false,
|
||||
disabled: el.disabled || false
|
||||
};
|
||||
});
|
||||
})()
|
||||
`);
|
||||
return { success: true, action: 'get_input_values', count: inputs.length, inputs };
|
||||
};
|
||||
Reference in New Issue
Block a user