driver.lock(5)
以上方法可以实现锁屏 5 秒后自动解锁,如果当前已经处于锁屏状态,也可以实现 5 秒后解锁,有木有什么方法可以直接判断当前是否处于锁屏状态?
def lock(self, seconds):
"""Lock the device for a certain period of time. iOS only.
:Args:
- the duration to lock the device, in seconds
"""
data = {
'seconds': seconds,
}
self.execute(Command.LOCK, data)
return self