How to use the error function from selenium-webdriver

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

6
7
8
9
10
11
12
13
14

//simplify webdriver usage
global.by = webdriver.By;
global.key = webdriver.Key;
global.promise = webdriver.promise;
global.bot = webdriver.error;
global.until = webdriver.until;

module.exports = fiveby;
fork icon8
star icon134
watch icon14

+ 3 other calls in file

38
39
40
41
42
43
44
45
46
47
  return this.findAll(scope);
};

Query.prototype.assert = function (el) {
  if (!el) {
    throw new webdriver.error.NoSuchElementError(
      `No such element: ${this.description}`
    );
  }
  return el;
fork icon0
star icon2
watch icon2

21
22
23
24
25
26
27
28
29
30
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;
this.promise = webdriver.promise;
this.until = webdriver.until;
this.Command = require('selenium-webdriver/lib/command').Command;
fork icon1
star icon0
watch icon2

45
46
47
48
49
50
51
52
53
54
Key = webdriver.Key;
Session = webdriver.Session;
WebDriver = webdriver.WebDriver;
WebElement = webdriver.WebElement;
WebElementPromise = webdriver.WebElementPromise;
error = webdriver.error;
logging = webdriver.logging;
promise = webdriver.promise;
until = webdriver.until;
Command = require('selenium-webdriver/lib/command').Command;
fork icon0
star icon0
watch icon35

+ 5 other calls in file