@@ -44,7 +44,7 @@ export class Screen {
4444 }
4545
4646 loadedHome = async ( ) => {
47- const lblHome = await this . _driver . findElementByAutomationText ( home ) ;
47+ const lblHome = await this . _driver . waitForElement ( home ) ;
4848 assert . isTrue ( await lblHome . isDisplayed ( ) ) ;
4949 console . log ( home + " loaded!" ) ;
5050 }
@@ -149,7 +149,7 @@ export class Screen {
149149 }
150150
151151 loadedModalFrame = async ( ) => {
152- const lblModal = await this . _driver . findElementByAutomationText ( modal , 1000 ) ;
152+ const lblModal = await this . _driver . waitForElement ( modal , 5000 ) ;
153153 assert . isTrue ( await lblModal . isDisplayed ( ) , `${ modal } is not displayed!` ) ;
154154 console . log ( modal + " loaded!" ) ;
155155 }
@@ -226,7 +226,7 @@ export class Screen {
226226 }
227227
228228 loadedSecondPage = async ( ) => {
229- const lblModalSecond = await this . _driver . findElementByAutomationText ( modalSecond ) ;
229+ const lblModalSecond = await this . _driver . waitForElement ( modalSecond , 5000 ) ;
230230 assert . isTrue ( await lblModalSecond . isDisplayed ( ) ) ;
231231 console . log ( modalSecond + " loaded!" ) ;
232232 }
@@ -259,7 +259,7 @@ export class Screen {
259259 }
260260
261261 loadedNestedModalFrame = async ( ) => {
262- const lblModalNested = await this . _driver . findElementByAutomationText ( modalNested ) ;
262+ const lblModalNested = await this . _driver . waitForElement ( modalNested , 5000 ) ;
263263 assert . isTrue ( await lblModalNested . isDisplayed ( ) ) ;
264264 console . log ( modalNested + " loaded!" ) ;
265265 }
0 commit comments