Skip to main content
Frame other methods for the Puppeteer driver.

detached

Is true if the frame has been detached. Otherwise, false. Upstream docs
result
boolean
Return value
await frame.detached();

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.
Upstream docs
result
SerializedHandle | null
Return value
await frame.frameElement();

page

The page associated with this frame.
Returns the cached page reference passed at construction time.
Upstream docs
result
RemotePuppeteerPage | null
Return value
await frame.page();

name

The frame’s name attribute as specified in the tag. Upstream docs
result
string
Return value
await frame.name();

parentFrame

The parent frame, if any.
Returns null for the main frame.
Upstream docs
result
string | null
Return value
await frame.parentFrame();

childFrames

Child frames of this frame. Upstream docs
result
string[]
Return value
await frame.childFrames();

addScriptTag

Add a script tag to the frame. Upstream docs
options
PuppeteerFrameAddScriptTagOptions
required
result
SerializedHandle
Return value
await frame.addScriptTag(/* PuppeteerFrameAddScriptTagOptions */);

addStyleTag

Add a style tag to the frame. Upstream docs
options
PuppeteerFrameAddStyleTagOptions
required
result
SerializedHandle
Return value
await frame.addStyleTag(/* PuppeteerFrameAddStyleTagOptions */);