message: Break from loop if the test is successful
  Making this mistake since while loops were created :(
diff: @@ -128,6 +128,7 @@ async function waitForPageWithText(
  true,
  `expected to find text ${text}`,
  );
  + break;
  } catch (error) {
  if (error instanceof browser.assert.AssertionError) {
  attemptsToSearchText++;
  