Device class

Constructors

Device(AsyncRequestClient _client, AppiumWebDriverHandler _handler)

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getClipboard({String contentType = ContentType.plaintext}) Future<String>
Get clipboard
getCurrentActivity() Future<String>
Get current activity Only for Android.
getCurrentPackage() Future<String>
Get current package. Only for Android.
getDisplayDensity() Future<int>
Get the display density. For Android
getLocation() Future<Location>
Get current location.
getOrientation() Future<Orientation>
Get the device orientation.
getSystemBars() Future<Map<String, dynamic>>
Get the system bar. For Android
getSystemTime() Future<String>
Get the time of the device under test.
isLocked() Future<bool>
Get the device lock status.
lock({Duration? seconds}) Future<void>
Lock the device under test.
longPressKeycode(int keycode, {List<int>? metastate, List<int>? flags}) Future<void>
For Android Long press keycode
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openNotification() Future<void>
Open notification Only for Android.
pressKeycode(int keycode, {List<int>? metastate, List<int>? flags}) Future<void>
For Android Press keycode
pullFile(String path) Future<String>
Pull a file as base 64 encoded string
pullFolder(String path) Future<String>
Pull a folder as base 64 encoded string
pushFile(String path, String base64EncodedData) Future<void>
Push the base 64 encoded file to the device under test
setClipboard(String base64encoded, {String contentType = ContentType.plaintext, String? label}) Future<void>
Set clipboard Sends base64 encoded string. You must decode it properly as the 1st argument.
setLocation(Location location) Future<void>
Set location.
setOrientation(Orientation orientation) Future<void>
Set the device orientation.
shake() Future<void>
Shake the device under test
startActivity({String? appPackage, String? appActivity, String? appWaitPackage, String? appWaitActivity, String? intentAction, String? intentCategory, String? intentFlags, String? optionalIntentArguments, String? dontStopAppOnReset}) Future<void>
Start Activity Only for Android.
toString() String
A string representation of this object.
override
unlock() Future<void>
Unlock the device under test

Operators

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