Thursday 4 May 2017

Auth capability with Selenium-Webdriver

I am trying to figure out how to authenticate with a Selenium server instance.

I have this:

let webdriver = require('selenium-webdriver');

let driver = new webdriver.Builder()
  .forBrowser('firefox')
  .withCapabilities(xxx)
  .usingServer('http://seleniumbox.wisco.com/wd/hub')
  .build();

I believe I have to set a username/password as a capability. But I do not know how to create a new Capability instance with Node.js.

Here are the docs, I am trying to find an example, but cannot find anything:

https://seleniumhq.github.io/selenium/docs/api/javascript/

I believe I need to pass the auth information as xxx above, but don't have an example.



via Alexander Mills

No comments:

Post a Comment