Lock
Lock the device
Example Usage
Java | driver.lockDevice(); |
Python | self.driver.lock(); |
Javascript | // webdriver.io example driver.lock(); // wd example await driver.lock(); |
Ruby | # ruby_lib example lock lock(5) # lock 5 seconds # ruby_lib_core example @driver.lock @driver.lock(5) # lock 5 seconds |
C# | driver.Lock(); // Supported by IOSDriver & AndroidDriver |
PHP | $driver->lock(5); |
Support
Appium Server
Appium Clients
HTTP API Specifications
Endpoint
POST /session/:session_id/appium/device/lock
URL Parameters
name | description |
---|---|
session_id | ID of the session to route the command to |
JSON Parameters
name | type | description |
---|---|---|
seconds | number | How long to lock the screen (iOS only). |
Response
null