The first element matching selector in the frame, or null.
Every element matching selector in the frame.
Runs pageFunction(elements, ...args) on every element matching selector.
Runs pageFunction(element, ...args) on the first element matching selector; fails when none matches.
Adds a <script> from url or content and returns its element. path is refused.
url, content, type, id
Adds a <link rel="stylesheet"> from url or a <style> from content and returns its element. path is refused.
The frame's child frames (synchronous).
Clicks the first element matching selector.
Optionaloptions: ClickOptionsThe frame's full HTML.
Runs pageFunction in the frame and returns its result as JSON.
JSON values or handles passed to pageFunction
Focuses the first element matching selector.
The <iframe> / <frame> element of this frame in its parent, or null for the main frame.
Navigates the frame to url and returns the main resource's response (:class, null for same-document
navigations).
Optionaloptions: NavigationOptions & { referer?: string }
timeout, waitUntil, referer
Hovers the first element matching selector.
Whether the frame has detached (synchronous).
Creates a :class for selectorOrFunction in this frame (synchronous); see Page.locator.
The frame's name attribute, or "" (synchronous).
The page object (page) the frame belongs to (synchronous).
The parent frame, or null for the main frame and detached frames (synchronous).
Selects values in the first <select> matching selector; returns the selected values.
Replaces the frame's document with html.
Optionaloptions: NavigationOptions
timeout, waitUntil as for Page.setContent
Taps the first element matching selector.
The frame document's title.
Focuses the first element matching selector and types text.
Optionaloptions: { delay?: number }
delay between key presses in milliseconds
The frame's url (synchronous).
Waits until pageFunction returns a truthy value in the frame and returns that value as a :class. Does not
wait for pjsc's own navigation first.
Optionaloptions: PageFnOptions
timeout, polling ("raf", "mutation" or milliseconds)
Waits for the frame's next navigation and returns its response (:class or null). Does not wait for
pjsc's own navigation first.
Optionaloptions: NavigationOptionsWaits for an element matching selector and returns it (null when waiting for hidden). Does not wait for pjsc's own
navigation first.
Optionaloptions: WaitForSelectorOptions
A frame of the page (the main frame or an iframe), as returned by Page.frames, Page.waitForFrame, ElementHandle.contentFrame and ElementHandle.frame.
pjsc differences:
url,name,parentFrame,childFrames,isDetached,detached,page,locator) read pjsc's copy of the frame tree, which is kept current as frames attach, detach and navigate.waitForNavigation,waitForSelectorandwaitForFunction.addScriptTag/addStyleTagrefusepath(no server file is read into the page).waitForNavigation,waitForSelectorandwaitForFunctionend with the render; theirsignaloption is ignored.waitForFunction'srootoption must be an :class of the same request.