waitForTarget method

Future<Target> waitForTarget(
  1. bool predicate(
    1. Target
    ), {
  2. Duration? timeout,
})

This searches for a target in this specific browser context.

Implementation

Future<Target> waitForTarget(bool Function(Target) predicate,
    {Duration? timeout}) {
  return browser.waitForTarget(
      (target) => target.browserContext == this && predicate(target),
      timeout: timeout);
}