page.locator

View as Markdown

page.locator is a browser runtime capability in the page namespace.

Availability

  • Runtime: browser
  • Kind: raw
  • Category: interaction
  • Supported drivers: Playwright, Puppeteer

SDK Surface

  • SDK path: runtime.page.locator
  • Async: No

HTTP Surface

  • Transport: workspace.execute(...)
  • Call: page.locator
  • Long-running: No

Reference Semantics

  • Requires refs: page
  • Returns refs: locator

Arguments

ArgumentTypeRequiredDescription
selectorstringYesSelector for the locator.

Result

  • Type: locator
  • Description: Bound locator reference for follow-up steps.

SDK Example

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

HTTP Example

1{
2 "runtime": "crm",
3 "steps": [
4 {
5 "call": "page.locator",
6 "args": [
7 "button[type=submit]"
8 ]
9 }
10 ]
11}