Break from loop if the test is successful
Making this mistake since while loops were created :(
This commit is contained in:
@@ -128,6 +128,7 @@ async function waitForPageWithText(
|
||||
true,
|
||||
`expected to find text ${text}`,
|
||||
);
|
||||
break;
|
||||
} catch (error) {
|
||||
if (error instanceof browser.assert.AssertionError) {
|
||||
attemptsToSearchText++;
|
||||
|
||||
Reference in New Issue
Block a user