Create waitUntilVisible SeleniumHelper function for Jest tests.

This commit is contained in:
BryceLTaylor 2021-11-08 16:37:15 -05:00
parent bbfbf8d731
commit 6992ca707f
2 changed files with 6 additions and 1 deletions

View file

@ -199,6 +199,10 @@ class SeleniumHelper {
return false;
}
async waitUntilVisible (element, driver) {
await driver.wait(until.elementIsVisible(element));
}
}
module.exports = SeleniumHelper;

View file

@ -7,7 +7,8 @@ const {
findByXpath,
clickXpath,
clickButton,
buildDriver
buildDriver,
waitUntilVisible
} = new SeleniumHelper();
let username = process.env.SMOKE_USERNAME;