Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

select

Simulate selecting a value from a dropdown on a webpage using a CSS selector. Designed for browser automation and web testing on ARM64 devices with Chromium ARM64 Browser.

Instructions

Select an option from a dropdown

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the select element
valueYesValue to select

Implementation Reference

  • The handler function for the 'select' tool. It evaluates JavaScript to find the select element by CSS selector, sets its value, dispatches a change event, and returns success or throws if not found.
    async select(selector, value) { await this.ensureChromium(); const result = await this.sendCDPCommand('Runtime.evaluate', { expression: ` const select = document.querySelector('${selector}'); if (select) { select.value = '${value}'; select.dispatchEvent(new Event('change', { bubbles: true })); true; } else { false; } `, returnByValue: true }); if (!result.result?.value) { throw new Error(`Select element not found: ${selector}`); } return { content: [{ type: 'text', text: `Selected '${value}' in ${selector}` }], }; }
  • index.js:214-230 (registration)
    Registration of the 'select' tool in the listTools response, including name, description, and input schema definition.
    name: 'select', description: 'Select an option from a dropdown', inputSchema: { type: 'object', properties: { selector: { type: 'string', description: 'CSS selector for the select element', }, value: { type: 'string', description: 'Value to select', }, }, required: ['selector', 'value'], }, },
  • index.js:366-366 (registration)
    The switch case in the callTool handler that routes calls to the 'select' method.
    return await this.select(args.selector, args.value);
  • Input schema definition for the 'select' tool, specifying required selector and value parameters.
    inputSchema: { type: 'object', properties: { selector: { type: 'string', description: 'CSS selector for the 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/nfodor/mcp-chromium-arm64'

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