Skip to main content
Glama

browsercat_select

Select an option from a dropdown menu on a webpage using CSS selectors to automate form interactions and web testing.

Instructions

Select an option from a dropdown menu

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for select element
valueYesValue to select

Implementation Reference

  • Implementation of the browsercat_select tool handler. Waits for the selector, selects the option by value using Puppeteer, and returns success or error message.
    case "browsercat_select": try { await page.waitForSelector(args.selector); await page.select(args.selector, args.value); return { content: [{ type: "text", text: `Selected ${args.selector} with: ${args.value}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Failed to select ${args.selector}: ${(error as Error).message}`, }], isError: true, }; }
  • index.ts:77-88 (registration)
    Registration of the browsercat_select tool in the TOOLS array, defining its name, description, and input schema.
    { name: "browsercat_select", description: "Select an option from a dropdown menu", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for select element" }, value: { type: "string", description: "Value to select" }, }, required: ["selector", "value"], }, },

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/pipethedev/browsercat-mcp-server'

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