Future<Null> waitFor(SerializableFinder finder, { Duration timeout: _kDefaultTimeout })

Waits until finder locates the target.

Source

Future<Null> waitFor(SerializableFinder finder, {Duration timeout: _kDefaultTimeout}) async {
  await _sendCommand(new WaitFor(finder, timeout: timeout));
  return null;
}