Expand description
§Chrome for Testing API Client
This crate provides programmatic access to “chrome-for-testing” JSON APIs, which are used to retrieve version details and other relevant information about Chrome and ChromeDriver for testing purposes.
§Modules Overview
api: Contains the core functionality to interact with the API endpoints.chromedriver: Facilitates interaction with ChromeDriver-specific data and operations.
§API Endpoints
The crate leverages the following JSON API endpoints:
- Known Good Versions: Provides a list of known good versions of Chrome.
- Last Known Good Versions: Retrieves the last known good version of Chrome.
For detailed documentation on these APIs, see the official Chrome for Testing documentation.
§Features
- Ease of Use: Simplifies interaction with Chrome’s testing-related APIs.
- Type-Safe Deserialization: Automatically maps JSON responses to Rust structs for seamless API interaction.
- Asynchronous Support: Fully asynchronous using the
tokioruntime.
§Example Usage
#[tokio::main]
async fn main() {
use chrome_for_testing::api::known_good_versions::KnownGoodVersions;
let client = reqwest::Client::new();
match KnownGoodVersions::fetch(client).await {
Ok(data) => println!("Successfully fetched Chrome versions: {:?}", data),
Err(e) => println!("Error occurred: {}", e),
}
}Modules§
- api
- Chrome for Testing API types and functions for fetching version information.
- chromedriver
- ChromeDriver specific utilities, such as log level configuration.
- error
- Error types used throughout the crate.