mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: add more playwright.locator mentions (#10763)
This commit is contained in:
parent
4e344724f9
commit
5d10fbd3d8
@ -166,6 +166,7 @@ When running in Debug Mode with `PWDEBUG=console`, a `playwright` object is avai
|
||||
* `playwright.$$(selector)`: Highlight all occurrences of the selector. This reflects
|
||||
how `page.$$` would see the page.
|
||||
* `playwright.inspect(selector)`: Inspect the selector in the Elements panel.
|
||||
* `playwright.locator(selector)`: Highlight the first occurrence of the locator.
|
||||
* `playwright.clear()`: Clear existing highlights.
|
||||
* `playwright.selector(element)`: Generate a selector that points to the element.
|
||||
|
||||
|
@ -183,6 +183,18 @@ Reveal element in the Elements panel (if DevTools of the respective browser supp
|
||||
> playwright.inspect('text=Log in')
|
||||
```
|
||||
|
||||
#### playwright.locator(selector)
|
||||
|
||||
Query Playwright element using the actual Playwright query engine, for example:
|
||||
|
||||
```js
|
||||
> playwright.locator('.auth-form').withText('Log in');
|
||||
|
||||
> Locator ()
|
||||
> - element: button
|
||||
> - elements: [button]
|
||||
```
|
||||
|
||||
#### playwright.selector(element)
|
||||
|
||||
Generates selector for the given element.
|
||||
|
Loading…
x
Reference in New Issue
Block a user