puppeteer/new-docs/puppeteer.page._.md
Changhao Han adeffbaac1
docs(new): migrate Page.ts to TSDoc (part 0 / 2) (#6104)
* docs(new): migrate Page.ts to TSDoc (part 0 / 2)

Co-authored-by: Changhao Han <changhaohan@chromium.org>
2020-06-26 09:24:56 +02:00

838 B

Home > puppeteer > Page > $

Page.$() method

Runs document.querySelector within the page. If no element matches the selector, the return value resolves to null.

Signature:

$(selector: string): Promise<ElementHandle | null>;

Parameters

Parameter Type Description
selector string A selector to query page for.

Returns:

Promise<ElementHandle | null>

Remarks

Shortcut for Page.mainFrame().$(selector).