javascript - usingSession in webdriver js -


Does anyone know how to use the op () op in Webdriver js? I have a WebDriver session started by another process and I would like to use the WebDrive JS API from that session.

Edit:

For a previously established session by javascript "layer" in webdrive JS (using the internal API):

  function createriver (port, session) {var base = require ('selenium-webdriver / _base'), executor = required ('selenium-webdriver / executable'); var url = base_url + ':' + port; var WebDriver = base.require ('webdriver.WebDriver'); var Executor = Examiner. The sequent exchanger (url); Return WebDriver.attachToSession (Exporter, Session); }   

Sadly, it seems that you can not already engage the current session if you use "builder.js" at the root level (node_modules \ selenium-webdriver, which is the one that comes "by default" when it works:

  var webdriver = requires ('Selenium-WebDriver') ; Var Driver = New WebDriver Builder (). withCapabilities (webdriver.Capabilities.chrome ()). Construction ();   

At that root root level, that builder.js allows you to import a WebDrive. Builder provided by builder.js located in that (node_modules \ selenium-webdriver \ lib) not quite the same. \ webdriver \ builder.js). This last one is too much and lets you do more stuff. (As it is already easy to attach to the current session)

I used the following as an attachment I'm doing an existing browser session

It uses the same solution as its own, but it suits itself before making itself, which I believe is called Build ().

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -