frames

command
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command frames is a chromedp example demonstrating how to reach elements inside an iframe and inside a shadow root. It starts two local servers that have different host names, so a page of the first server can embed a page of the second one as a cross-site iframe. The program reads and clicks an element inside an iframe of the same site with the option FromNode. It reaches an element inside an open shadow root with a JSPath selector, and it waits for that element with WaitNotPresent and WaitVisible. At the end, it tries the same query on the cross-site iframe and shows that it finds nothing. Then it attaches to the iframe as a target of its own. It starts local servers and needs no internet. Use -v to print the protocol messages, -visible to show the browser window and leave it open, and -visible-on-terminal to draw the page in the terminal with terminal graphics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL