appium: Error finding unlock pin buttons
The problem
Unable to unlock android device, using unlock type pin
Environment
- Appium version 1.17.1
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: Ubuntu
- Node.js version (unless using Appium.app|exe):12
- Npm or Yarn package manager: 6.3
- Mobile platform/version under test: Android v9
- Real device or emulator/simulator: Real
- Appium CLI or Appium.app|exe: CLI
Details
Appium is unable to unlock device, due to the error below , using the following caps
dc.setCapability("appium:unlockType", "pin");
dc.setCapability("appium:unlockKey", "0000")
Link to Appium logs
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (1 by maintainers)
Different devices might have customized lock screens and/or customized unlock algorithms (e.g. different keys might be used to activate the screen). That is why it is important to have exactly the same hardware to be able to reproduce such issues, which is not achievable.
@Amrkamel1 Thanks for the update. As @mykola-mokhnach mentioned it may have customized unlock algo. I have this device Galaxy S8 , SM-G950F , v9. Let me debug from my side.
https://github.com/appium/appium/issues/14175#issuecomment-618946072 is not full log, but if we could found the customised full page source, we can tweak https://github.com/appium/appium-android-driver/blob/e2a7e4b5407b845ce7f21b8e4b0be0c2cc0fd01a/lib/unlock-helpers.js#L98-L132