chrome-for-testing
Provides serde-enabled type definitions covering the chrome-for-testing JSON API responses,
and programmatic access to the API endpoints through reqwest, allowing you to fetch information
about available Chrome and ChromeDriver versions for automated testing.
Links
- Blog post: Chrome for Testing announcement
- Live API: Chrome for Testing availability
- API documentation: JSON API endpoints
- Crate documentation: docs.rs
Related Crates
chrome-for-testing-manager
You may want to check out chrome-for-testing-manager, a
crate building upon this one to allow easy selection and installation of chrome-for-testing versions.
It also comes with support for the thirtyfour WebDriver crate.
Installation
Add this to your Cargo.toml:
[]
= "0.2.0"
Or use cargo add:
cargo add chrome-for-testing
Features
- Type-safe API access - Serde-enabled type definitions for all API responses.
- Async support - Built on
reqwestfor non-blocking HTTP requests. - Provides access to the following APIs:
KnownGoodVersions- Get all historical Chrome versions.LastKnownGoodVersions- Get latest versions for each release channel.
- Platform detection - Automatically detect the current platform (os/arch) to filter responses.
- ChromeDriver utilities - Additional tools for ChromeDriver configuration.
Usage
Getting the "Last Known Good Versions"
Use this API if you just want to know the latest version of one particular (or multiple) release channels.
use Channel;
use LastKnownGoodVersions;
use Error;
async
Getting all "Known Good Versions"
Use this API if you just want to know all historical version. Particularly useful if you plan to run a fixed version.
This example also shows how the Platform type can be used to filter available download URLs for the current platform.
use KnownGoodVersions;
use Platform;
use Error;
async
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.