Files
MCP-Browser/tools/type.js
T

9 lines
361 B
JavaScript

const browser = require('../browser');
module.exports = async ({ selector, text, clear = false, slowly = false }) => {
if (!selector || !text) throw new Error('Selector e text são obrigatórios');
await browser.start();
await browser.type(selector, text, { clear, slowly });
return { success: true, action: 'type', selector, text, clear, slowly };
};