doubleTap method
Future<void>
doubleTap(
- NativeSelector selector, {
- String? appId,
- Duration? timeout,
- Duration? delayBetweenTaps,
Double 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.
The delayBetweenTaps parameter allows you to specify the duration
between consecutive taps in milliseconds. This can be useful in scenarios
where the target view requires a certain delay between taps to register
the action correctly, such as in cases of UI responsiveness or animations.
The default delay between taps is 300 milliseconds.
Note: The delayBetweenTaps parameter is currently respected only
for Android.
Implementation
Future<void> doubleTap(
NativeSelector selector, {
String? appId,
Duration? timeout,
Duration? delayBetweenTaps,
}) => _platform.action.mobile(
android: () => _platform.android.doubleTap(
_getSafeAndroidSelector(selector),
timeout: timeout,
delayBetweenTaps: delayBetweenTaps,
),
ios: () => _platform.ios.doubleTap(
_getSafeIOSSelector(selector),
appId: appId,
timeout: timeout,
),
);