Fixed waitUntilVisible should wait for selector, if present. This is used by waitForFlash.

This commit is contained in:
witzig 2017-05-27 14:29:16 +02:00
parent a9285e1181
commit b1eebd9804

View file

@ -35,6 +35,10 @@ module.exports = (...extras) => Object.assign({
async waitUntilVisible(selector) {
await driver.wait(until.elementLocated(By.css('body')), waitTimeout);
if (selector) {
await driver.wait(until.elementLocated(By.css(selector)), waitTimeout);
}
for (const elem of (this.elementsToWaitFor || [])) {
const sel = this.elements[elem];
if (!sel) {