Skip to main content

chrome_for_testing_manager/
lib.rs

1//! Programmatic management of [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/)
2//! installations.
3//!
4//! Resolves a `chrome` / `chromedriver` pair against the Chrome for Testing release index,
5//! downloads it into a per-user cache, spawns `chromedriver` on a configurable or OS-assigned
6//! port, and (with the default `thirtyfour` feature) provides managed `WebDriver` sessions that
7//! tear down on drop.
8//!
9//! Start with [`Chromedriver::run`] / [`Chromedriver::run_default`]. Reach for
10//! [`ChromeForTestingManager`] when you need finer control over the resolve / download / launch
11//! steps.
12
13#![allow(clippy::non_minimal_cfg)] // Keep provider feature lists easy to extend.
14
15mod cache;
16pub(crate) mod chromedriver;
17mod download;
18mod error;
19pub(crate) mod mgr;
20mod output;
21pub(crate) mod port;
22#[cfg(any(feature = "thirtyfour"))]
23pub(crate) mod session;
24#[cfg(any(feature = "thirtyfour"))]
25pub(crate) mod session_builder;
26pub(crate) mod version;
27
28pub use chrome_for_testing::Channel;
29pub use chrome_for_testing::Version;
30pub use chromedriver::{Chromedriver, ChromedriverRunConfig};
31pub use error::{ChromeForTestingArtifact, ChromeForTestingManagerError, Result};
32pub use mgr::{
33    ChromeBinary, ChromeForTestingManager, LoadedBrowserPackage, LoadedChromeHeadlessShellPackage,
34    LoadedChromePackage,
35};
36pub use output::{
37    DriverOutputInspectors, DriverOutputLine, DriverOutputListener, DriverOutputSource,
38};
39pub use port::{Port, PortRequest};
40#[cfg(any(feature = "thirtyfour"))]
41pub use session::Session;
42#[cfg(any(feature = "thirtyfour"))]
43pub use session_builder::SessionBuilder;
44pub use tokio_process_tools::{
45    GracefulShutdown, GracefulShutdownBuilder, UnixGracefulPhase, UnixGracefulShutdown,
46    UnixGracefulSignal, WindowsGracefulShutdown,
47};
48pub use version::{SelectedVersion, VersionRequest};