Puppeteer Locator
All Locator methods available when using the Puppeteer driver.
Access via runtime.page.locator(...) after launching a Puppeteer runtime.
How these methods work over HTTP
Every method below is a remote call. The SDK translates it into a structured step sent to a single endpoint:
The call field maps directly to the method name. args is a JSON array of the method’s arguments. You can batch multiple steps in one request.
Actions
click(options?)
Clicks the located element.
fill(value, options?)
Fills out the input identified by the locator.
The type of the input is determined at runtime and the appropriate fill-out method is chosen based on the type. contenteditable, select, textarea and input elements are supported.
hover(options?)
Hovers over the located element.
scroll(options?)
Scrolls the located element.
Queries
filter(predicate)
Creates an expectation that is evaluated against located values.
If the expectations do not match, then the locator will retry. For RPC, the predicate function is serialized as a string.
Returns RemotePuppeteerLocator<S>
Waiting
wait(options?)
Waits for the locator to get the serialized value from the page.
Note this requires the value to be JSON-serializable. If a mapper was applied via map(), returns the mapped value.
Returns T
waitHandle(options?)
Waits for the locator to get a handle from the page.
Returns RemotePuppeteerElementHandle
Other
map(mapper)
Maps the locator using the provided mapper function.
For RPC, the mapper function is serialized as a string. The result is returned when wait() is called.
Returns RemotePuppeteerLocator<S>

