Module tab

Module tab 

Source
Expand description

Browser tab automation. Browser tab automation and control.

Each Tab represents a browser tab with a specific frame context.

§Module Structure

ModuleDescription
coreTab struct and accessors
navigationURL navigation, history
framesFrame switching
scriptJavaScript execution
elementsElement search and observation
networkRequest interception, blocking
storageCookies, localStorage, sessionStorage
proxyTab-level proxy
screenshotPage and element screenshots
scrollScroll control

§Example

let tab = window.tab();

// Navigate
tab.goto("https://example.com").await?;

// Find elements
let button = tab.find_element("#submit").await?;
button.click().await?;

// Screenshot
let png = tab.screenshot().png().capture().await?;
tab.screenshot().jpeg(80).save("page.jpg").await?;

// Scroll
tab.scroll_by(0, 500).await?;

Structs§

FrameInfo
Information about a frame in the tab.
ScreenshotBuilder
Builder for configuring and capturing screenshots.
Tab
A handle to a browser tab.

Enums§

ImageFormat
Image format for screenshots.