fromExistingSession function

WebDriver fromExistingSession(
  1. String sessionId,
  2. {Uri? uri,
  3. WebDriverSpec spec = core.WebDriverSpec.Auto,
  4. Map<String, dynamic>? capabilities}

Creates a sync WebDriver from existing session using SyncHttpRequestClient.

It will not make a call to WebDriver server if both spec (other than core.WebDriverSpec.Auto) and capabilities are provided (empty is fine). Otherwise, capabilities will be ignored.

This will bring in dependency on dart:io. Note: WebDriver endpoints will be constructed using resolve against uri. Therefore, if uri does not end with a trailing slash, the last path component will be dropped.


core.WebDriver fromExistingSession(String sessionId,
        {Uri? uri,
        core.WebDriverSpec spec = core.WebDriverSpec.Auto,
        Map<String, dynamic>? capabilities}) =>
        uri: uri, spec: spec, capabilities: capabilities);