diff --git a/README.md b/README.md index 3c6a4ec..d40387c 100644 --- a/README.md +++ b/README.md @@ -255,11 +255,11 @@ See `config.example.toml` for a complete configuration example. ## WebDriver Browser Automation -g3 includes WebDriver support for browser automation tasks. Safari is the default, with Chrome headless available as an alternative. +g3 includes WebDriver support for browser automation tasks. Chrome headless is the default, with Safari available as an alternative. **One-Time Setup** (macOS only): -Safari Remote Automation must be enabled before using WebDriver tools. Run this once: +If you want to use Safari instead of Chrome headless, Safari Remote Automation must be enabled. Run this once: ```bash # Option 1: Use the provided script @@ -276,11 +276,11 @@ safaridriver --enable # Requires password **Usage**: ```bash -# Use Safari (default, opens a visible browser window) -g3 --webdriver +# Use Safari (opens a visible browser window) +g3 --safari -# Use Chrome in headless mode (no visible window, runs in background) -g3 --chrome-headless +# Use Chrome in headless mode (default, no visible window, runs in background) +g3 ``` **Chrome Setup Options**: diff --git a/crates/g3-cli/src/cli_args.rs b/crates/g3-cli/src/cli_args.rs index ae46110..6e6dd55 100644 --- a/crates/g3-cli/src/cli_args.rs +++ b/crates/g3-cli/src/cli_args.rs @@ -68,14 +68,14 @@ pub struct Cli { pub quiet: bool, /// Enable WebDriver browser automation tools - #[arg(long)] + #[arg(long, default_value_t = true)] pub webdriver: bool, /// Use Chrome in headless mode for WebDriver (instead of Safari) - #[arg(long)] + #[arg(long, default_value_t = true)] pub chrome_headless: bool, - /// Use Safari for WebDriver (this is the default) + /// Use Safari for WebDriver (overrides the default Chrome headless) #[arg(long)] pub safari: bool,