Available on crate feature
webdriver only.Expand description
WebDriver utils
Structs§
- WebDriver
Controller - WebDriver controller with RAII cleanup (mirrors BrowserController).
Constants§
- CLEANUP_
CDP_ MARKERS webdriver_stealth - Stealth scripts from spider_fingerprint - cleans up automation markers. Clean up ChromeDriver markers (cdc_, $cdc_) that anti-bot systems detect. These properties are injected by ChromeDriver for automation control. Non-intrusive: only removes properties that match known automation patterns. Safe: wrapped in try-catch, checks property existence before removal.
- HIDE_
SELENIUM_ MARKERS webdriver_stealth - Stealth scripts from spider_fingerprint - cleans up automation markers. Hide selenium-specific markers from the window and document objects. Non-intrusive: only patches properties that actually exist on the object. Safe: all operations wrapped in try-catch, won’t throw or break page.
- HIDE_
WEBDRIVER webdriver_stealth - Stealth scripts from spider_fingerprint - cleans up automation markers. Hide the webdriver from being enabled. You should not need this if you use the cli args to launch chrome - disabled-features=AutomationEnabled
Functions§
- attempt_
navigation - Attempt to navigate to a URL.
- close_
driver - Close the WebDriver session (consumes the driver).
- execute_
script - Execute JavaScript on the page and return the result as a JSON value.
- get_
current_ url - Get the current URL.
- get_
page_ content - Get the page content (HTML source).
- get_
page_ title - Get the page title.
- get_
random_ webdriver_ viewport real_browser - Get a random viewport for stealth purposes.
- launch_
driver - Launch a WebDriver session with the provided configuration.
- launch_
driver_ base - Launch a WebDriver session with the base configuration.
- run_
automation - Run a single WebAutomation action on the WebDriver.
- run_
automation_ scripts - Run a list of WebAutomation actions on the WebDriver.
- run_
execution_ scripts - Run execution scripts (JavaScript) for a specific URL.
- run_
url_ automation_ scripts - Run automation scripts for a specific URL.
- setup_
driver_ events webdriver_stealth - Setup WebDriver events and stealth mode. Injects spider_fingerprint stealth scripts to:
- spoof_
device_ memory webdriver_stealth - Stealth scripts from spider_fingerprint - cleans up automation markers. Spoof navigator.deviceMemory - commonly fingerprinted property. Returns a realistic value based on the platform (4-8 GB for desktop, 2-4 for mobile). Non-intrusive: only patches if property exists or is supported.
- take_
screenshot webdriver_screenshot - Take a screenshot of the page.
- wait_
for_ element - Wait for an element to be present.
Type Aliases§
- WebDriver
Control - WebDriver control tuple type alias (mirrors BrowserControl).