Skip to main content
Glama
devskido

Playwright MCP Server

by devskido

playwright_iframe_fill

Fill form fields or input elements located within iframes on web pages using CSS selectors to specify both the iframe and target element.

Instructions

Fill an element in an iframe on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iframeSelectorYesCSS selector for the iframe containing the element to fill
selectorYesCSS selector for the element to fill
valueYesValue to fill

Implementation Reference

  • Core handler implementation for 'playwright_iframe_fill'. Uses Playwright's frameLocator to target iframe and fill the specified selector with the provided value.
    export class IframeFillTool extends BrowserToolBase { /** * Execute the iframe fill tool */ async execute(args: any, context: ToolContext): Promise<ToolResponse> { return this.safeExecute(context, async (page) => { const frame = page.frameLocator(args.iframeSelector); if (!frame) { return createErrorResponse(`Iframe not found: ${args.iframeSelector}`); } await frame.locator(args.selector).fill(args.value); return createSuccessResponse(`Filled element ${args.selector} inside iframe ${args.iframeSelector} with: ${args.value}`); }); } }
  • MCP tool schema defining the name, description, and input parameters (iframeSelector, selector, value) for 'playwright_iframe_fill'.
    { name: "playwright_iframe_fill", description: "Fill an element in an iframe on the page", inputSchema: { type: "object", properties: { iframeSelector: { type: "string", description: "CSS selector for the iframe containing the element to fill" }, selector: { type: "string", description: "CSS selector for the element to fill" }, value: { type: "string", description: "Value to fill" }, }, required: ["iframeSelector", "selector", "value"], }, },
  • Tool registration in the main switch dispatcher: maps 'playwright_iframe_fill' call to IframeFillTool.execute(). The tool instance is created earlier at line 323.
    case "playwright_iframe_fill": return await iframeFillTool.execute(args, context);
  • Tool name listed in BROWSER_TOOLS constant for categorization.
    "playwright_iframe_fill",
  • src/tools.ts:455-455 (registration)
    Tool name included in BROWSER_TOOLS array used for conditional browser launch.
    "playwright_iframe_fill",

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/devskido/customed-playwright'

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