thirtyfour
Thirtyfour is a Selenium / WebDriver library for Rust, for automated website UI testing.
Features
- All W3C WebDriver and WebElement methods supported
- Create new browser session directly via WebDriver (e.g. chromedriver)
- Create new browser session via Selenium Standalone or Grid
- Find elements (via all common selectors e.g. Id, Class, CSS, Tag, XPath)
- Send keys to elements, including key-combinations
- Execute Javascript
- Action Chains
- Get and set cookies
- Switch to frame/window/element/alert
- Shadow DOM support
- Alert support
- Capture / Save screenshot of browser or individual element as PNG
- Chrome DevTools Protocol (CDP) support (limited)
- Advanced query interface including explicit waits and various predicates
- Component Wrappers (similar to
Page Object Model)
Feature Flags
rustls-tls: (Default) Use rustls to provide TLS support (via reqwest).native-tls: Use native TLS (via reqwest).component: (Default) Enable theComponentderive macro (via thirtyfour_macros).
Examples
The examples assume you have chromedriver running on your system.
You can use Selenium (see instructions below) or you can use chromedriver directly by downloading the chromedriver that matches your Chrome version, from here: https://chromedriver.chromium.org/downloads
Then run it like this:
chromedriver
Example (async):
To run this example:
cargo run --example tokio_async
use *;
async
Minimum Supported Rust Version
The MSRV for thirtyfour is currently latest, and so its guaranteed to run the latest stable release.
LICENSE
This work is dual-licensed under MIT or Apache 2.0. You can choose either license if you use this work.
See the NOTICE file for more details.
SPDX-License-Identifier: MIT OR Apache-2.0