Updated to new webdriverio config api, and fixed failing tests.

This commit is contained in:
orangemug
2020-02-18 21:39:11 +00:00
parent ba9d21c045
commit 2cc7c63bb1
2 changed files with 12 additions and 5 deletions

View File

@@ -6,8 +6,10 @@ var helper = require("../helper");
function closeModal(wdKey) {
const selector = wd.$(wdKey);
browser.waitUntil(function() {
const elem = $(wdKey);
const elem = $(selector);
return elem.isDisplayedInViewport();
});
@@ -15,8 +17,9 @@ function closeModal(wdKey) {
closeBtnSelector.click();
browser.waitUntil(function() {
const elem = $(wdKey);
return !elem.isDisplayed();
return browser.execute((selector) => {
return !document.querySelector(selector);
}, selector);
});
}