Puppeteer Frame
All Frame methods available when using the Puppeteer driver.
Access via frame after launching a Puppeteer runtime.
How these methods work over HTTP
Every method below is a remote call. The SDK translates it into a structured step sent to a single endpoint:
The call field maps directly to the method name. args is a JSON array of the method’s arguments. You can batch multiple steps in one request.
Navigation
goto(url, options?)
Navigate the frame to a URL.
Returns PuppeteerHTTPResponse \| null
waitForNavigation(options?)
Wait for navigation to complete.
Returns PuppeteerHTTPResponse \| null
Page Info
url()
The frame’s URL.
Returns string
title()
The frame’s title.
Returns string
content()
The full HTML contents of the frame.
Returns string
setContent(html, options?)
Set the content of the frame.
Actions
click(selector, options?)
Click on an element.
type(selector, text, options?)
Type text into an element.
focus(selector)
Focus on an element.
hover(selector)
Hover over an element.
select(selector, …values)
Select options in a <select> element.
Returns string[]
tap(selector)
Tap on an element.
Queries
page()
The page associated with this frame.
Returns the cached page reference passed at construction time.
Returns RemotePuppeteerPage \| null
locator(selector)
Creates a Locator for the given selector.
Locators are used for performing actions on elements with built-in waiting.
Returns RemotePuppeteerLocator
$(selector)
Query for a single element.
Returns RemotePuppeteerElementHandle \| null
$$(selector)
Query for all matching elements.
Returns RemotePuppeteerElementHandle[]
$x(expression)
Evaluate XPath expression. (Uses $$() with xpath prefix internally)
Returns RemotePuppeteerElementHandle[]
State Checks
isDetached()
Whether this frame is detached.
@deprecated Use the detached getter.
Returns boolean
isMainFrame()
Is this the main frame?
Returns boolean
isOOPFrame()
Is this an out-of-process frame? (Deprecated - always returns false)
Returns boolean
Waiting
waitForSelector(selector, options?)
Wait for a selector to appear.
Returns RemotePuppeteerElementHandle \| null
waitForFunction(pageFunction, options?, …args)
Wait for a function to return a truthy value.
Returns RemotePuppeteerJSHandle<Awaited<ReturnType<Func>>>
Evaluation
evaluate(pageFunction, …args)
Evaluate JavaScript in the frame context.
Returns T
$eval(selector, pageFunction, …args)
Evaluate JavaScript on a selected element.
Returns T
$$eval(selector, pageFunction, …args)
Evaluate JavaScript on all matching elements.
Returns T
evaluateHandle(pageFunction, …args)
Evaluates a function in the frame’s context and returns a handle to the result.
Returns RemotePuppeteerJSHandle<Awaited<ReturnType<Func>>>
Other
detached()
Is true if the frame has been detached. Otherwise, false.
Returns boolean
frameElement()
The frame element associated with this frame, if any.
Returns the ElementHandle for the <iframe> or <frame> tag for this frame. Returns null for the main frame.
Returns RemotePuppeteerElementHandle \| null
name()
The frame’s name attribute as specified in the tag.
Returns string
parentFrame()
The parent frame, if any.
Returns null for the main frame.
Returns RemotePuppeteerFrame \| null
childFrames()
Child frames of this frame.
Returns RemotePuppeteerFrame[]
addScriptTag(options)
Add a script tag to the frame.
Returns RemotePuppeteerElementHandle
addStyleTag(options)
Add a style tag to the frame.
Returns RemotePuppeteerElementHandle

