Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static async attachToSession (sessionId, {
protocol = DEFAULTS.protocol,
hostname = DEFAULTS.hostname,
port = DEFAULTS.port,
path = DEFAULTS.path,
...otherParams
}, capabilities = {}, isW3C = true) {
if (!sessionId) {
throw new Error("Can't attach to a session without a session id");
}
const params = {sessionId, isW3C, protocol, hostname, port, path, capabilities, ...otherParams};
const sessionClient = await WDCore.attachToSession(params);
return new Session(sessionClient);
}
}