Add Chrome headless diagnostic tool
Runs automatically when --chrome-headless flag is used, checking: - ChromeDriver installation and PATH - Chrome/Chromium installation - Chrome and ChromeDriver version compatibility - config.toml chrome_binary setting - Chrome for Testing installation - ChromeDriver executable permissions (macOS quarantine) Displays a detailed report with: - Summary of detected versions and paths - Pass/warning/error status for each check - Specific fix suggestions for any issues found Users can then ask g3 to help fix any detected issues.
This commit is contained in:
@@ -548,6 +548,17 @@ pub async fn run() -> Result<()> {
|
||||
if cli.chrome_headless {
|
||||
config.webdriver.enabled = true;
|
||||
config.webdriver.browser = g3_config::WebDriverBrowser::ChromeHeadless;
|
||||
|
||||
// Run Chrome diagnostics on first use
|
||||
let report = g3_computer_control::run_chrome_diagnostics(
|
||||
config.webdriver.chrome_binary.as_deref(),
|
||||
);
|
||||
|
||||
// Display the diagnostic report
|
||||
println!("{}", report.format_report());
|
||||
|
||||
// If there are errors, the user can ask g3 to help fix them
|
||||
// We continue anyway to let the user decide
|
||||
}
|
||||
|
||||
// Apply safari flag override
|
||||
|
||||
Reference in New Issue
Block a user