*** title: locator.press description: Send a keypress to the matched element. ---------------------------------------------------- `locator.press` is a browser runtime capability in the `locator` namespace. ## Availability * Runtime: `browser` * Kind: `raw` * Category: `interaction` * Supported drivers: Playwright, Puppeteer ## SDK Surface * SDK path: `runtime.page.locator(...).press` * Async: Yes ## HTTP Surface * Transport: `workspace.execute(...)` * Call: `locator.press` * Long-running: No ## Reference Semantics * Requires refs: `locator` ## Arguments | Argument | Type | Required | Description | | --------- | -------- | -------- | ------------------------------- | | `key` | `string` | Yes | Keyboard key or chord to press. | | `options` | `object` | No | Driver keypress options. | ## Result * Type: `void` * Description: Resolves when the keypress completes. ## SDK Example ```ts await runtime.page.locator('button[type=submit]').press('Enter'); ``` ## HTTP Example ```json { "runtime": "crm", "steps": [ { "call": "locator.press", "args": [ "Enter" ] } ] } ``` ## Related Capabilities * [`locator.type`](../interaction/locator-type) * [`locator.fill`](../interaction/locator-fill)