scraping_browser_click
Click on web page elements using CSS selectors to automate browser interactions for data collection and navigation.
Instructions
Click on an element. Avoid calling this unless you know the element selector (you can use other tools to find those)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector for the element to click |
Implementation Reference
- browser_tools.js:115-123 (handler)The execute function that handles the tool execution: retrieves the browser page and clicks the element matching the given CSS selector.execute: async({selector})=>{ const page = await (await require_browser()).get_page(); try { await page.click(selector, {timeout: 5000}); return `Successfully clicked element: ${selector}`; } catch(e){ throw new UserError(`Error clicking element ${selector}: ${e}`); } },
- browser_tools.js:112-114 (schema)Zod schema defining the input parameters: a required 'selector' string for the CSS selector.parameters: z.object({ selector: z.string().describe('CSS selector for the element to click'), }),
- browser_tools.js:307-320 (registration)The tool is registered by being included in the exported 'tools' array (line 312), which is used for MCP tool registration when API_TOKEN is set.export const tools = process.env.API_TOKEN ? [ scraping_browser_navigate, scraping_browser_go_back, scraping_browser_go_forward, scraping_browser_links, scraping_browser_click, scraping_browser_type, scraping_browser_wait_for, scraping_browser_screenshot, scraping_browser_get_text, scraping_browser_get_html, scraping_browser_scroll, scraping_browser_scroll_to, ] : [scraping_browser_activation_instructions];