Package io.appium.java_client
Interface LocksDevice
-
- All Superinterfaces:
CanRememberExtensionPresence,ExecutesMethod
- All Known Implementing Classes:
AndroidDriver,IOSDriver
public interface LocksDevice extends ExecutesMethod, CanRememberExtensionPresence
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanisDeviceLocked()Check if the device is locked.default voidlockDevice()This method locks a device.default voidlockDevice(java.time.Duration duration)Lock the device (bring it to the lock screen) for a given number of seconds or forever (until the command for unlocking is called).default voidunlockDevice()Unlock the device if it is locked.-
Methods inherited from interface io.appium.java_client.CanRememberExtensionPresence
assertExtensionExists, markExtensionAbsence
-
Methods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
-
-
-
Method Detail
-
lockDevice
default void lockDevice()
This method locks a device. It will return silently if the device is already locked.
-
lockDevice
default void lockDevice(java.time.Duration duration)
Lock the device (bring it to the lock screen) for a given number of seconds or forever (until the command for unlocking is called). The call is ignored if the device has been already locked.- Parameters:
duration- for how long to lock the screen. Minimum time resolution is one second. A negative/zero value will lock the device and return immediately.
-
unlockDevice
default void unlockDevice()
Unlock the device if it is locked. This method will return silently if the device is not locked.
-
isDeviceLocked
default boolean isDeviceLocked()
Check if the device is locked.- Returns:
- true if the device is locked or false otherwise.
-
-