Skip to content

Commit

Permalink
E2E EditorPage - Update waitForElementToBeDisplayedById to WebdriverIO
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Oct 9, 2023
1 parent 98def0b commit f47cc01
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -978,11 +978,14 @@ class EditorPage {
}

async waitForElementToBeDisplayedById( id, timeout = 2000 ) {
return await this.driver.waitForElementByAccessibilityId(
id,
wd.asserters.isDisplayed,
timeout
);
const element = await this.driver.$( `~${ id }` );

if ( element ) {
return element;
}

await element.waitForDisplayed( { timeout } );
return element;
}

async waitForElementToBeDisplayedByXPath( id, timeout = 2000 ) {
Expand Down

0 comments on commit f47cc01

Please sign in to comment.