How to use the Browser function from selenium-webdriver

Find comprehensive JavaScript selenium-webdriver.Browser code examples handpicked from public code repositorys.

210
211
212
213
214
215
216
217
218
219
end

  {{< /tab >}}
  {{< tab header="JavaScript" >}}
const webdriver = require('selenium-webdriver');
const BROWSER_NAME = webdriver.Browser.CHROME;

async function getDriver() {
  return new webdriver.Builder()
  .usingServer('<grid-url>')
fork icon916
star icon568
watch icon29

9
10
11
12
13
14
15
16
17
18
this.ElementArrayFinder = require('./element').ElementArrayFinder;
this.ProtractorBy = require('./locators').ProtractorBy;
this.ProtractorExpectedConditions = require('./expectedConditions').ProtractorExpectedConditions;
// Export selenium webdriver.
this.ActionSequence = webdriver.ActionSequence;
this.Browser = webdriver.Browser;
this.Builder = webdriver.Builder;
this.Button = webdriver.Button;
this.Capabilities = webdriver.Capabilities;
this.Capability = webdriver.Capability;
fork icon1
star icon0
watch icon2

33
34
35
36
37
38
39
40
41
42
ProtractorBy = require('./locators').ProtractorBy;
ProtractorExpectedConditions = require('./expectedConditions').ProtractorExpectedConditions;

// Export selenium webdriver.
ActionSequence = webdriver.ActionSequence;
Browser = webdriver.Browser;
Builder = webdriver.Builder;
Button = webdriver.Button;
Capabilities = webdriver.Capabilities;
Capability = webdriver.Capability;
fork icon0
star icon0
watch icon35

+ 5 other calls in file