Fixed waitUntilVisible should wait for selector, if present. This is used by waitForFlash.
This commit is contained in:
parent
a9285e1181
commit
b1eebd9804
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,10 @@ module.exports = (...extras) => Object.assign({
|
||||||
async waitUntilVisible(selector) {
|
async waitUntilVisible(selector) {
|
||||||
await driver.wait(until.elementLocated(By.css('body')), waitTimeout);
|
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 || [])) {
|
for (const elem of (this.elementsToWaitFor || [])) {
|
||||||
const sel = this.elements[elem];
|
const sel = this.elements[elem];
|
||||||
if (!sel) {
|
if (!sel) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue