Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
#85 - fixed waitForSelector options.
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestas-zekas committed Jan 20, 2021
1 parent 7744aa8 commit dc01d37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class Element {

async waitUntilVisible(timeout = defaultTimeout) {
console.log(`Waiting for ${this.selector} to be visible...`);
const elementHandle = await page.waitForSelector(this.selector, { visible: true, timeout: timeout });
const elementHandle = await page.waitForSelector(this.selector, { state: "visible", timeout: timeout });
if (config.captureScreenshots) {
await Helpers.takeScreenshot();
}
Expand All @@ -37,7 +37,7 @@ export default class Element {

async waitUntilInvisible(timeout = defaultTimeout) {
console.log(`Waiting for ${this.selector} to be invisible...`);
await page.waitForSelector(this.selector, { hidden: true, timeout: timeout });
await page.waitForSelector(this.selector, { state: "hidden", timeout: timeout });
if (config.captureScreenshots) {
await Helpers.takeScreenshot();
}
Expand Down

0 comments on commit dc01d37

Please sign in to comment.