docs: add ref to waitForSelector from querySelector (#6514)

This commit is contained in:
Max Schmitt 2021-05-12 08:07:49 +02:00 committed by GitHub
parent a04c54ac28
commit 8af8b6340d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -2046,7 +2046,7 @@ Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
- returns: <[null]|[ElementHandle]>
The method finds an element matching the specified selector within the page. If no elements match the selector, the
return value resolves to `null`.
return value resolves to `null`. To wait for an element on the page, use [`method: Page.waitForSelector`].
Shortcut for main frame's [`method: Frame.querySelector`].

3
types/types.d.ts vendored
View File

@ -167,7 +167,8 @@ export interface Page {
/**
* The method finds an element matching the specified selector within the page. If no elements match the selector, the
* return value resolves to `null`.
* return value resolves to `null`. To wait for an element on the page, use
* [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#pagewaitforselectorselector-options).
*
* Shortcut for main frame's [frame.$(selector)](https://playwright.dev/docs/api/class-frame#frameselector).
* @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details.