Interface HasDeviceTime

All Superinterfaces:
ExecutesMethod
All Known Implementing Classes:
AndroidDriver, FlutterAndroidDriver, FlutterIOSDriver, IOSDriver

public interface HasDeviceTime extends ExecutesMethod
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Gets device date and time for both iOS(host time is returned for simulators) and Android devices.
    default String
    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

      default String getDeviceTime(String format)
      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

      default String 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