Back to Docs
Advanced

frame

Access iframes and Shadow DOM. List iframes, evaluate JS inside them, or read shadow root content.

Usage

$ cdpilot frame <subcmd> [args...]

Arguments

NameRequiredDescription
subcmdrequiredlist, eval <js>, or shadow <selector>

Examples

List all iframes on the page

$ npx cdpilot frame list

Evaluate JS in the frame context

$ npx cdpilot frame eval "document.title"

Read shadow DOM content of an element

$ npx cdpilot frame shadow "#my-component"