How to use the WebElementPromise function from selenium-webdriver
Find comprehensive JavaScript selenium-webdriver.WebElementPromise code examples handpicked from public code repositorys.
51 52 53 54 55 56 57 58 59 60
const fwd = scope.driver_ || scope; const el = this.filters ? this.all(scope).then(matches => this.assert(matches[0])) : scope.findElement(this.by).catch(() => this.assert()); const elementPromise = new webdriver.WebElementPromise(fwd, el); return fwd._decorateElement(elementPromise); }; Query.prototype.findAll = function (scope) {
0
2
2
GitHub: shootdaj/MIDIatorModules
20 21 22 23 24 25 26 27 28 29
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; this.promise = webdriver.promise; this.until = webdriver.until;
1
0
2
146 147 148 149 150 151 152 153 154 155
if (!selector) { return null; } // eslint-disable-next-line no-async-promise-executor return new WebElementPromise(this.driver, new Promise(async (resolve, reject) => { if (selector instanceof Promise) { try { selector = await selector; } catch (error) {
0
0
0
+ 5 other calls in file
13 14 15 16 17 18 19 20 21 22
await this.driver.wait(until.elementIsEnabled(element), this.milisecondsTimeout); await this.driver.sleep(this.milisecondsDelay); const el = await this.driver.findElement(_locator); return el; }; return new WebElementPromise(this.driver, _getElement(locator)); } async elementExists(locator) { try {
0
0
0
GitHub: blend/protractor
44 45 46 47 48 49 50 51 52 53
FileDetector = webdriver.FileDetector; 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;
0
0
35
+ 5 other calls in file
GitHub: dewdad/selene
51 52 53 54 55 56 57 58 59 60
const selene = scope.driver_ || scope; const el = this.filters ? this.all(scope).then(matches => this.assert(matches[0])) : scope.findElement(this.by).catch(() => this.assert()); const elementPromise = new webdriver.WebElementPromise(selene, el); return selene._decorateElement(elementPromise); }; Query.prototype.findAll = function (scope) {
0
0
1
selenium-webdriver.Builder is the most popular function in selenium-webdriver (1701 examples)