isLocked
Check whether the device screen is locked.
Usage​
await browser.isLocked()
Example​
isLocked.js
it('should check if the device is locked', async () => {
const locked = await browser.isLocked()
console.log('Device is locked:', locked)
})
Returns​
- <
Promise<boolean>>returns:trueif the device is locked,falseotherwise
Support​
Supported platforms: iOS, Android
note
Refer to the official Appium driver documentation to see which driver versions support this command.