Skip to main content

resolve_connection

Function resolve_connection 

Source
pub async fn resolve_connection(
    host: &str,
    port: Option<u16>,
    ws_url: Option<&str>,
) -> Result<ResolvedConnection, AppError>
Expand description

Resolve a Chrome connection using the priority chain:

  1. Explicit --ws-url
  2. Explicit --port (user provided, not the default)
  3. Session file (with health check)
  4. Auto-discover (default host:port 9222)
  5. Error with suggestion

ยงErrors

Returns AppError if no Chrome connection can be resolved.