Skip to main content

SetPasscode

Description

Use this command to set a passcode on the device. If it fails, it throws an exception.

The passcode is defined by the Cloud administrator. Therefore, the command does not take any parameters.

This command is supported in iOS only.

warning

Changing the language or region while a passcode is set is not supported. If you change the language or region on a device with a passcode enabled, the device might not work as expected.

Usage

info

Replace <server> with the appropriate URL.

SetPasscode

DesiredCapabilities dc = new DesiredCapabilities();
driver = new IOSDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
              
...
...
seetest.setPasscode();