puppeteer_select
Select specific options in dropdown menus on web pages using CSS selectors to automate form interactions and data input.
Instructions
Select an element on the page with Select tag
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector for element to select | |
| value | Yes | Value to select |
Implementation Reference
- index.ts:253-272 (handler)Handler implementation for the puppeteer_select tool. Waits for the selector, selects the option with the given value using Puppeteer's page.select method, and returns success or error message.case "puppeteer_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:67-78 (schema)Tool schema definition including name, description, and input schema for puppeteer_select.{ name: "puppeteer_select", description: "Select an element on the page with Select tag", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to select" }, value: { type: "string", description: "Value to select" }, }, required: ["selector", "value"], }, },
- index.ts:410-412 (registration)Registration of tools list via ListToolsRequestSchema handler, which includes puppeteer_select in the TOOLS array.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));