Break from loop if the test is successful

Making this mistake since while loops were created :(
This commit is contained in:
Himanshu Mishra
2020-05-05 17:28:43 +09:00
parent fe2f7265d3
commit a93f194cb6
+1
View File
@@ -128,6 +128,7 @@ async function waitForPageWithText(
true,
`expected to find text ${text}`,
);
break;
} catch (error) {
if (error instanceof browser.assert.AssertionError) {
attemptsToSearchText++;