class Playwright::Frame

“‘
run(playwright)
with sync_playwright() as playwright:
dump_frame_tree(child, indent + “ ”)
for child in frame.child_frames:
print(indent + frame.name + ’@‘ + frame.url)
def dump_frame_tree(frame, indent):
browser.close()
dump_frame_tree(page.main_frame, “”)
page.goto(“www.theverge.com”)
page = browser.new_page()
browser = firefox.launch()
firefox = playwright.firefox
def run(playwright: Playwright):
from playwright.sync_api import sync_playwright, Playwright
“`python sync
An example of dumping frame tree:
- [`event: Page.frameDetached`] - fired when the frame gets detached from the page. A Frame can be detached from the page only once.
- [`event: Page.frameNavigated`] - fired when the frame commits navigation to a different URL.
- [`event: Page.frameAttached`] - fired when the frame gets attached to the page. A Frame can be attached to the page only once.
`Frame` object’s lifecycle is controlled by three events, dispatched on the page object:
[‘method: Frame.childFrames`] methods.
At every point of time, page exposes its current frame tree via the [`method: Page.mainFrame`] and

def add_script_tag(content: nil, path: nil, type: nil, url: nil)

Adds a `