IOSAutomator class abstract interface

Provides functionality to interact with the OS that the app under test is running on.

Communicates over http with the native automation server running on the target device.

Properties

hashCode int
The hash code for this object.
no setterinherited
resolvedAppId String
Returns the platform-dependent unique identifier of the app under test.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeHeadsUpNotification() Future<void>
Closes the currently visible heads up notification.
closeNotifications() Future<void>
Closes the notification shade.
inherited
configure() Future<void>
Configures the native automator.
inherited
denyPermission() Future<void>
Denies the permission that the currently visible native permission request dialog is asking for.
inherited
disableAirplaneMode() Future<void>
Enables airplane mode.
inherited
disableBluetooth() Future<void>
Disables bluetooth.
inherited
disableCellular() Future<void>
Disables cellular (aka mobile data connection).
inherited
disableDarkMode({String? appId}) Future<void>
Disables dark mode.
inherited
disableWifi() Future<void>
Disables Wi-Fi.
inherited
doubleTap(IOSSelector selector, {String? appId, Duration? timeout}) Future<void>
Double taps on the native view specified by selector.
enableAirplaneMode() Future<void>
Enables airplane mode.
inherited
enableBluetooth() Future<void>
Enables bluetooth.
inherited
enableCellular() Future<void>
Enables cellular (aka mobile data connection).
inherited
enableDarkMode({String? appId}) Future<void>
Enables dark mode.
inherited
enableWifi() Future<void>
Enables Wi-Fi.
inherited
enterText(IOSSelector selector, {required String text, String? appId, KeyboardBehavior? keyboardBehavior, Duration? timeout, Offset? tapLocation}) Future<void>
Enters text to the native view specified by selector.
enterTextByIndex(String text, {required int index, String? appId, KeyboardBehavior? keyboardBehavior, Duration? timeout, Offset? tapLocation}) Future<void>
Enters text to the index-th visible text field.
getFirstNotification() Future<Notification>
Returns the first, topmost visible notification.
inherited
getNativeViews(IOSSelector? selector, {List<String>? iosInstalledApps, String? appId}) Future<IOSGetNativeViewsResponse>
Returns a list of currently visible native UI controls, specified by selector, which are currently visible on screen.
getNotifications() Future<List<Notification>>
Returns notifications that are visible in the notification shade.
inherited
getOsVersion() Future<int>
Gets the OS version.
inherited
grantPermissionOnlyThisTime() Future<void>
Grants the permission that the currently visible native permission request dialog is asking for.
inherited
grantPermissionWhenInUse() Future<void>
Grants the permission that the currently visible native permission request dialog is asking for.
inherited
isPermissionDialogVisible({Duration timeout = const Duration(seconds: 1)}) Future<bool>
Waits until a native permission request dialog becomes visible within timeout.
inherited
isVirtualDevice() Future<bool>
Checks if the app is running on a virtual device (simulator or emulator).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openApp({String? appId}) Future<void>
Opens the app specified by appId. If appId is null, then the app under test is started (using resolvedAppId).
inherited
openNotifications() Future<void>
Opens the notification shade.
inherited
openPlatformApp({required Object iosAppId}) Future<void>
Opens a platform-specific app.
openQuickSettings() Future<void>
Opens the quick settings shade on Android and Control Center on iOS.
inherited
openUrl(String url) Future<void>
Opens the URL specified by url.
inherited
pickImageFromGallery({IOSSelector? imageSelector, int? index, Duration? timeout}) Future<void>
Pick an image from the gallery
pickMultipleImagesFromGallery({required List<int> imageIndexes, IOSSelector? imageSelector, Duration? timeout}) Future<void>
Pick multiple images from the gallery
pressHome() Future<void>
Presses the home button.
inherited
pressRecentApps() Future<void>
Presses the recent apps button.
inherited
pressVolumeDown() Future<void>
Press volume down
inherited
pressVolumeUp() Future<void>
Press volume up
inherited
pullToRefresh({Offset from = const Offset(0.5, 0.5), Offset to = const Offset(0.5, 0.9)}) Future<void>
Simulates pull-to-refresh gesture.
selectCoarseLocation() Future<void>
Select the "coarse location" (aka "approximate") setting on the currently visible native permission request dialog.
inherited
selectFineLocation() Future<void>
Select the "fine location" (aka "precise") setting on the currently visible native permission request dialog.
inherited
setMockLocation(double latitude, double longitude, {String? packageName}) Future<void>
Set mock location
inherited
stopMockLocation() Future<void>
Stop mock location
inherited
swipe({required Offset from, required Offset to, String? appId, bool enablePatrolLog = true}) Future<void>
Swipes from from to to.
swipeBack({double dy = 0.5, String? appId}) Future<void>
Mimics the swipe back (left to right) gesture.
takeCameraPhoto({IOSSelector? shutterButtonSelector, IOSSelector? doneButtonSelector, Duration? timeout}) Future<void>
Take and confirm the photo
tap(IOSSelector selector, {String? appId, Duration? timeout}) Future<void>
Taps on the native view specified by selector.
tapAt(Offset location, {String? appId}) Future<void>
Taps at a given location.
tapBackToPreviousAppButton({Duration? timeout}) Future<void>
Taps on the iOS "back to previous app" breadcrumb button.
tapOnNotificationByIndex(int index, {Duration? timeout}) Future<void>
Searches for the index-th visible notification and taps on it.
tapOnNotificationBySelector(IOSSelector selector, {Duration? timeout}) Future<void>
Taps on the visible notification using selector.
toString() String
A string representation of this object.
inherited
waitUntilVisible(IOSSelector selector, {String? appId, Duration? timeout}) Future<void>
Waits until the native view specified by selector becomes visible. It waits for the view to become visible for timeout duration. If timeout is not specified, it utilizes the IOSAutomatorConfig.findTimeout.

Operators

operator ==(Object other) bool
The equality operator.
inherited