Skip to main content
Glama

scraping_browser_click

Click on web page elements using CSS selectors to interact with websites, navigate interfaces, and trigger actions during web automation and data extraction tasks.

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
NameRequiredDescriptionDefault
selectorYesCSS selector for the element to click

Implementation Reference

  • The execute function that clicks on the element matching the given CSS selector using the browser page, with error handling.
    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}`); } },
  • Zod input schema defining the 'selector' parameter as a string (CSS selector for the element to click).
    parameters: z.object({ selector: z.string().describe('CSS selector for the element to click'), }),
  • The tool object 'scraping_browser_click' is registered in the conditional export of the 'tools' array when the API_TOKEN environment variable 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];

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsouza-anush/brightdata-mcp-heroku'

If you have feedback or need assistance with the MCP directory API, please join our Discord server