4

I am writing automation test scripts in python using appium and the application being tested requires that the device have the screen lock enabled. The script will uninstall the app if it's present and install a new copy, but will only proceed if the device/screen lock is enabled. What I'm looking for is a way to programmatically unlock the device with a passcode. This can be with appium or via a command line and the device can't be jailbroken.

The only thing that I have tried (and can think of) is with the appium device unlock, but this only works when there is no passcode.

Ideally, the solution would be a lot like this, but only for iOS: How to unlock android phone through ADB

Community
  • 1
  • 1
RKelley
  • 1,099
  • 8
  • 14

2 Answers2

0

So far, theres no way to unlock a passcode locked iphone using appium info here

juhlila
  • 1,114
  • 1
  • 10
  • 16
0

You can use the below DesiredCapabilities based on the type of unlock method(Pattern or pin)

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("unlockType", "pattern");
caps.setCapability("unlockKey", "3568471");

replace "pattern" with "pin" if you have to unlock by pin.

S.B
  • 13,077
  • 10
  • 22
  • 49
Suhas
  • 1