| Crates.io | chrome-for-testing-manager |
| lib.rs | chrome-for-testing-manager |
| version | 0.5.2 |
| created_at | 2025-01-17 16:11:48.967777+00 |
| updated_at | 2025-06-01 13:06:55.696506+00 |
| description | Programmatic management of chrome-for-testing installations. |
| homepage | |
| repository | https://github.com/lpotthast/chrome-for-testing-manager |
| max_upload_size | |
| id | 1520756 |
| size | 118,603 |
Programmatic management of chrome-for-testing installations.
Chromedriver::run_latest_stable is a shortcut for
Chromedriver::run(VersionRequest::LatestIn(Channel::Stable), PortRequest::Any).chrome and chromedriver binaries into a local cache directory.Frees you from the need to
[dependencies]
thirtyfour = "0.35"
chrome-for-testing-manager = { version = "0.5", features = ["thirtyfour"] }
# Additional dependencies for the example below.
assertr = "0.1"
anyhow = "1"
tokio = { version = "1", features = ["full"] }
use assertr::prelude::*;
use chrome_for_testing_manager::prelude::*;
use thirtyfour::prelude::*;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mut chromedriver = Chromedriver::run_latest_stable().await?;
chromedriver.with_session(async |session| {
// Navigate to https://wikipedia.org.
session.goto("https://wikipedia.org").await?;
let elem_form = session.find(By::Id("search-form")).await?;
// Find element from element.
let elem_text = elem_form.find(By::Id("searchInput")).await?;
// Type in the search terms.
elem_text.send_keys("selenium").await?;
// Click the search button.
let elem_button = elem_form.find(By::Css("button[type='submit']")).await?;
elem_button.click().await?;
// Look for header to implicitly wait for the page to load.
session.find(By::ClassName("firstHeading")).await?;
assert_that(session.title().await?).is_equal_to("Selenium - Wikipedia");
Ok(())
}).await?;
chromedriver.terminate().await?;
Ok(())
}
0.5.0, the minimum supported rust version is 1.85.00.1.0, the minimum supported rust version is 1.81.0