diff --git a/docs/api.md b/docs/api.md index 7f45b43b9f8..cd666c89178 100644 --- a/docs/api.md +++ b/docs/api.md @@ -27,6 +27,7 @@ + [event: 'requestfinished'](#event-requestfinished) + [event: 'response'](#event-response) + [page.$(selector)](#pageselector) + + [page.$$(selector)](#pageselector) + [page.addScriptTag(url)](#pageaddscripttagurl) + [page.click(selector[, options])](#pageclickselector-options) + [page.close()](#pageclose) @@ -85,6 +86,7 @@ + [dialog.type](#dialogtype) * [class: Frame](#class-frame) + [frame.$(selector)](#frameselector) + + [frame.$$(selector)](#frameselector) + [frame.addScriptTag(url)](#frameaddscripttagurl) + [frame.childFrames()](#framechildframes) + [frame.evaluate(pageFunction, ...args)](#frameevaluatepagefunction-args) @@ -297,6 +299,14 @@ The method runs `document.querySelector` within the page. If no element matches Shortcut for [page.mainFrame().$(selector)](#frameselector). +#### page.$$(selector) +- `selector` <[string]> Selector to query page for +- returns: <[Promise]<[Array]<[ElementHandle]>>> + +The method runs `document.querySelectorAll` within the page. If no elements match the selector, the return value resolve to `[]`. + +Shortcut for [page.mainFrame().$$(selector)](#frameselector-1). + #### page.addScriptTag(url) - `url` <[string]> Url of the `