tap method

Future<void> tap(
  1. NativeSelector selector, {
  2. String? appId,
  3. Duration? timeout,
})

Taps on the native view specified by selector.

It waits for the view to become visible for timeout duration. If timeout is not specified, it utilizes the NativeAutomatorConfig.findTimeout duration from the configuration. If the native view is not found, an exception is thrown.

Implementation

Future<void> tap(
  NativeSelector selector, {
  String? appId,
  Duration? timeout,
}) => _platform.action.mobile(
  android: () => _platform.android.tap(
    _getSafeAndroidSelector(selector),
    timeout: timeout,
  ),
  ios: () => _platform.ios.tap(
    _getSafeIOSSelector(selector),
    appId: appId,
    timeout: timeout,
  ),
);