tap method

Future<void> tap(
  1. CompoundSelector selector, {
  2. Duration? timeout,
})

Taps on the native view specified by selector.

It waits for the view to become visible for timeout duration. If the native view is not found, an exception is thrown.

Implementation

Future<void> tap(CompoundSelector selector, {Duration? timeout}) {
  return platform.action.mobile(
    android: () => platform.android.tap(selector.android, timeout: timeout),
    ios: () => platform.ios.tap(selector.ios, timeout: timeout),
    desktop: () => platform.desktop.tap(
      name: selector.android.text,
      className: selector.android.className,
    ),
  );
}