playwright_press_key
Simulate keyboard key presses in a browser environment. Specify the key and optionally a CSS selector to focus on an element before pressing the key. Useful for automating web interactions.
Instructions
Press a keyboard key
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>"
},
"name": "playwright_press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key to press (e.g. 'Enter', 'ArrowDown', 'a') | |
| selector | No | Optional CSS selector to focus before pressing key |