press
Send a key to the current page and identify the focused element afterwards, enabling tests of keyboard navigation, form submission, and dialog closing.
Instructions
Press a key on the current page and report which element holds the focus afterwards. Use it to test keyboard access, to submit a form with Enter or to close a dialog with Escape.
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": "press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key name as Playwright writes it, such as Tab, Shift+Tab, Enter, Escape, ArrowDown or Space. |