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:
16
README.md
16
README.md
@@ -273,11 +273,25 @@ g3 --webdriver
|
||||
g3 --webdriver --safari
|
||||
```
|
||||
|
||||
**Chrome Headless Setup**: Install ChromeDriver:
|
||||
**Chrome Setup Options**:
|
||||
|
||||
*Option 1: Use Chrome for Testing (Recommended)* - Guarantees version compatibility:
|
||||
```bash
|
||||
./scripts/setup-chrome-for-testing.sh
|
||||
```
|
||||
Then add to your `~/.config/g3/config.toml`:
|
||||
```toml
|
||||
[webdriver]
|
||||
chrome_binary = "/Users/yourname/.chrome-for-testing/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
||||
```
|
||||
|
||||
*Option 2: Use system Chrome* - Requires matching ChromeDriver version:
|
||||
- macOS: `brew install chromedriver`
|
||||
- Linux: `apt install chromium-chromedriver`
|
||||
- Or download from: https://chromedriver.chromium.org/downloads
|
||||
|
||||
**Note**: If you see "ChromeDriver version doesn't match Chrome version" errors, use Option 1 (Chrome for Testing) which bundles matching versions.
|
||||
|
||||
## macOS Accessibility API Tools
|
||||
|
||||
G3 includes support for controlling macOS applications via the Accessibility API, allowing you to automate native macOS apps.
|
||||
|
||||
Reference in New Issue
Block a user