Playwright MCP Server

playwright_press_key

Simulate keyboard key presses in a browser environment using a specific CSS selector to focus on elements. Enables precise interaction with web pages for testing or automation tasks.

Instructions

Press a keyboard key

Input Schema

NameRequiredDescriptionDefault
keyYesKey to press (e.g. 'Enter', 'ArrowDown', 'a')
selectorNoOptional CSS selector to focus before pressing key

Input Schema (JSON Schema)

{ "properties": { "key": { "description": "Key to press (e.g. 'Enter', 'ArrowDown', 'a')", "type": "string" }, "selector": { "description": "Optional CSS selector to focus before pressing key", "type": "string" } }, "required": [ "key" ], "type": "object" }
ID: iiafoz7ogl