tapOnNotificationBySelector method
Taps on the visible notification using selector
.
If the notification is not visible immediately, this method waits for the
notification to become visible for timeout
duration. If timeout
is not
specified, it utilizes the NativeAutomatorConfig.findTimeout duration
from the configuration.
Notification shade has to be opened first with openNotifications.
On iOS, only Selector.textContains is taken into account.
See also:
- tapOnNotificationByIndex, which is less flexible but also less verbose
Implementation
Future<void> tapOnNotificationBySelector(
Selector selector, {
Duration? timeout,
}) async {
await _wrapRequest(
'tapOnNotificationBySelector',
() => _client.tapOnNotification(
TapOnNotificationRequest(
selector: selector,
timeoutMillis: timeout?.inMilliseconds,
),
),
);
}