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::{ChromeForTestingManager, LoadedChromePackage};
33pub use output::{
34    DriverOutputInspectors, DriverOutputLine, DriverOutputListener, DriverOutputSource,
35};
36pub use port::{Port, PortRequest};
37#[cfg(any(feature = "thirtyfour"))]
38pub use session::Session;
39#[cfg(any(feature = "thirtyfour"))]
40pub use session_builder::{DefaultCaps, DefaultConfig, SessionBuilder};
41pub use tokio_process_tools::{
42    GracefulShutdown, GracefulShutdownBuilder, UnixGracefulPhase, UnixGracefulShutdown,
43    UnixGracefulSignal, WindowsGracefulShutdown,
44};
45pub use version::{SelectedVersion, VersionRequest};