How to use the WebDriver function from selenium-webdriver

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

18
19
20
21
22
23
24
25
26
27
this.Capability = webdriver.Capability;
this.EventEmitter = webdriver.EventEmitter;
this.FileDetector = webdriver.FileDetector;
this.Key = webdriver.Key;
this.Session = webdriver.Session;
this.WebDriver = webdriver.WebDriver;
this.WebElement = webdriver.WebElement;
this.WebElementPromise = webdriver.WebElementPromise;
this.error = webdriver.error;
this.logging = webdriver.logging;
fork icon1
star icon0
watch icon2

1032
1033
1034
1035
1036
1037
1038
1039
1040
1041

///////////////////////////////////////////////////////////////////////////
// Selenium Webdriver
///////////////////////////////////////////////////////////////////////////
async wait(conditionFn, timeMs, message, retryInterval) {
  const driver = new WebDriver(Promise.resolve());
  await driver.wait(conditionFn(), timeMs, message, retryInterval);

  return {
    value: null
fork icon0
star icon0
watch icon0

42
43
44
45
46
47
48
49
50
51
Capability = webdriver.Capability;
EventEmitter = webdriver.EventEmitter;
FileDetector = webdriver.FileDetector;
Key = webdriver.Key;
Session = webdriver.Session;
WebDriver = webdriver.WebDriver;
WebElement = webdriver.WebElement;
WebElementPromise = webdriver.WebElementPromise;
error = webdriver.error;
logging = webdriver.logging;
fork icon0
star icon0
watch icon35

+ 5 other calls in file

27
28
29
30
31
32
33
34
35
36
 */
for (let foo in webdriver) {
  exports[foo] = webdriver[foo];
}

// Explicitly define webdriver.WebDriver
// TODO: extend WebDriver from selenium-webdriver typings
export class Webdriver {
  actions: () => ActionSequence;
  call:
fork icon0
star icon0
watch icon35

+ 3 other calls in file

27
28
29
30
31
32
33
34
35
36
 */
for (let foo in webdriver) {
  exports[foo] = webdriver[foo];
}

// Explicitly define webdriver.WebDriver.
export class Webdriver {
  actions: () => webdriver.ActionSequence = webdriver.WebDriver.actions;
  wait:
      (condition: webdriver.promise.Promise|webdriver.util.Condition|Function,
fork icon0
star icon0
watch icon2

+ 3 other calls in file

37
38
39
40
41
42
43
44
45
 * @public
 * @return {WebDriver} webdriver instance
 */
getNewDriver(): webdriver.WebDriver {
  var executor = executors.createExecutor(this.config_.seleniumAddress);
  var newDriver = webdriver.WebDriver.attachToSession(executor, this.config_.seleniumSessionId);
  this.drivers_.push(newDriver);
  return newDriver;
}
fork icon0
star icon0
watch icon35