Add Chrome for Testing support for reliable WebDriver automation
- Add setup script (scripts/setup-chrome-for-testing.sh) that downloads matching Chrome and ChromeDriver versions from Google's CDN - Add chrome_binary config option to specify custom Chrome binary path - Update ChromeDriver to support custom binary via with_port_headless_and_binary() - Update README with Chrome for Testing setup instructions - Update config.example.toml with chrome_binary documentation Chrome for Testing is Google's dedicated browser for automated testing that guarantees version compatibility with ChromeDriver, avoiding the common 'version mismatch' errors when Chrome auto-updates.
This commit is contained in:
@@ -132,6 +132,10 @@ pub struct WebDriverConfig {
|
||||
#[serde(default)]
|
||||
pub chrome_port: u16,
|
||||
#[serde(default)]
|
||||
/// Optional path to Chrome binary (e.g., Chrome for Testing)
|
||||
/// If not set, ChromeDriver will use the default Chrome installation
|
||||
pub chrome_binary: Option<String>,
|
||||
#[serde(default)]
|
||||
pub browser: WebDriverBrowser,
|
||||
}
|
||||
|
||||
@@ -152,6 +156,7 @@ impl Default for WebDriverConfig {
|
||||
enabled: true,
|
||||
safari_port: 4444,
|
||||
chrome_port: 9515,
|
||||
chrome_binary: None,
|
||||
browser: WebDriverBrowser::ChromeHeadless,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user