waitUntilExtensionInstalled function

Future<void> waitUntilExtensionInstalled(
  1. WebDriver driver,
  2. Duration? timeout
)

Waits until extension is installed.

Implementation

Future<void> waitUntilExtensionInstalled(async_io.WebDriver driver, Duration? timeout) async {
  await waitFor<void>(() =>
      driver.execute(r'return typeof(window.$flutterDriver)', <String>[]),
      matcher: 'function',
      timeout: timeout ?? const Duration(days: 365));
}