Page tree
Skip to end of metadata
Go to start of metadata

Last updated: May 15, 2019 14:53

By: Christopher Alton


Device is locked or goes into a locked state during Manual or Automated Testing.


This can be caused by a user setting a passcode/PIN/password on a mobile device. Device locking occurs due to lack of device interaction, also referred to as inactivity time. This can happen during Automation and Manual testing modes. It can also happen when a device is set to immediately lock, and the device session ends where the device immediately locks again.

This can also be caused by a mobile device manager (MDM). To learn more about apps and MDM usage, please review this article on MDM and passcode usage for cloud devices.

Solution #1: The Home Command

By using the HOME command during automation, this should take you to the home screen of the device. If the device does not require immediate password locking, then this should resolve a passcode/PIN/password enabled device.

Solution #2: Configure the Timeouts for the screen lock

Please see the article about how to use MDM and passcodes/PIN/passwords, that is linked above. This will solve the screen lock timeout

Solution #3: Remove the Passcode/PIN/Password from the device

The optimal solution that would require no script writing or level of effort impact, is to simply remove the passcode/PIN/password from the device.

Important Note:

By default, Perfecto sets every device to stay awake and not sleep (if possible). Perfecto does not put passcodes/PIN/passwords on mobile devices.

If none of these solutions work for your needs, please contact our support team via the support portal on our Perfecto website.