waitForText abstract method

FutureOr<void> waitForText(
  1. String text, {
  2. Duration? timeout,
})

Waits for specific text to appear on the page.

text is the text to wait for. timeout is the maximum time to wait (defaults to browser config timeout).

Example:

await browser.waitForText('Welcome back!');
await browser.waitForText('Order confirmed', timeout: Duration(seconds: 10));

Implementation

FutureOr<void> waitForText(String text, {Duration? timeout});