How to use the WebElementCondition function from selenium-webdriver
Find comprehensive JavaScript selenium-webdriver.WebElementCondition code examples handpicked from public code repositorys.
34 35 36 37 38 39 40 41 42
/* eslint-disable no-unused-vars */ function waitForVisibleElement (locator, t) { var timeout = t || 3000; var element = driver.wait(until.elementLocated(locator), timeout); return driver.wait(new webdriver.WebElementCondition('for element to be visible ' + locator, function () { return element.isDisplayed().then(x => x ? element : null); }), timeout); }
395
0
2
72 73 74 75 76 77 78 79 80
.then(res => res.every(Boolean)) ); }; Query.prototype.untilOne = function (scope) { return new webdriver.WebElementCondition(`for ${this}`, driver => this.findOne(scope || driver).catch(() => null) ); };
0
2
2
selenium-webdriver.Builder is the most popular function in selenium-webdriver (1701 examples)