View Source Improve this doc

lock

Lock the device.

Usage

1
browser.lock(seconds);

Parameters

Param Type Details
seconds Number wait in seconds until lock screen

Example

lockIt.js
1
2
3
4
5
6
7
it('demonstrate the lock and unlock command', function () {
browser.lock();
console.log(browser.isLocked()); // true

browser.unlock();
console.log(browser.isLocked()); // false
});

Support

Support for android