fromExistingSession function Null safety
- String sessionId,
- {Uri? uri,
- WebDriverSpec spec = core.WebDriverSpec.Auto,
- 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.
Implementation
core.WebDriver fromExistingSession(String sessionId,
{Uri? uri,
core.WebDriverSpec spec = core.WebDriverSpec.Auto,
Map<String, dynamic>? capabilities}) =>
core.fromExistingSession(
sessionId, (prefix) => SyncHttpRequestClient(prefix),
uri: uri, spec: spec, capabilities: capabilities);