How to use the webdriver.attachToSession function in webdriver

To help you get started, we’ve selected a few webdriver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github projectxyzio / web2driver / src / driver.js View on Github external
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);
  }
}

webdriver

A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol

MIT
Latest version published 13 days ago

Package Health Score

94 / 100
Full package analysis