puppeteer/website/versioned_docs/version-9.1.1/puppeteer.page.__.md
2021-08-10 11:09:48 +01:00

803 B

Home > puppeteer > Page > $$

Page.$$() method

The method runs document.querySelectorAll within the page. If no elements match the selector, the return value resolves to [].

Signature:

$$<T extends Element = Element>(selector: string): Promise<Array<ElementHandle<T>>>;

Parameters

Parameter Type Description
selector string A selector to query page for

Returns:

Promise<Array<ElementHandle<T>>>

Remarks

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