Package io.appium.java_client
Interface HasDeviceTime
- All Superinterfaces:
ExecutesMethod
- All Known Implementing Classes:
AndroidDriver,FlutterAndroidDriver,FlutterIOSDriver,IOSDriver
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGets device date and time for both iOS(host time is returned for simulators) and Android devices.default StringgetDeviceTime(String format) Gets device date and time for both iOS(host time is returned for simulators) and Android devices.Methods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
Method Details
-
getDeviceTime
Gets device date and time for both iOS(host time is returned for simulators) and Android devices.- Parameters:
format- The set of format specifiers. Read https://momentjs.com/docs/ to get the full list of supported datetime format specifiers. The default format is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601- Returns:
- Device time string
- Since:
- Appium 1.18
-
getDeviceTime
Gets device date and time for both iOS(host time is returned for simulators) and Android devices. The default format since Appium 1.8.2 is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601.- Returns:
- Device time string
-