locator.press

View as Markdown

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

ArgumentTypeRequiredDescription
keystringYesKeyboard key or chord to press.
optionsobjectNoDriver keypress options.

Result

  • Type: void
  • Description: Resolves when the keypress completes.

SDK Example

1await runtime.page.locator('button[type=submit]').press('Enter');

HTTP Example

1{
2 "runtime": "crm",
3 "steps": [
4 {
5 "call": "locator.press",
6 "args": [
7 "Enter"
8 ]
9 }
10 ]
11}