Show a less intrusive warning when capturing a "secure" Android screen

Android allows developers to set some screens as “secure” so that they can’t be screen recorded. This is helpful to add security to credit card fields.

When using Mobile Spy or Test Recorder, if we try to capture objects on a “secure” Android screen, we get a scary message that we’re unable to capture objects:

It turns out this that is just a warning, and we can still capture objects, even if the screen preview pane doesn’t stay up-to-date.

An improvement would be that Katalon Studio could catch the TakeScreenshotException and put a friendlier message in the screen shot pane to indicate that the screen may be secure but objects can still be captured.

Screen Shot 2018-09-06 at 12.40.37 AM.png

Hi Chris,

We receive the same warning with our application. Unfortunately, we are unable to capture any of the fields or objects. Are we missing something in our build to work with Katalon? Our team is currently using Selenium and WebDriver which works so I am trying to understand why Katalon cannot record.

I did record a simple test using the APDDemo.APK.

Thank you,
Any help will be greatly appreciated.
Paul

Hi Paul,

Do you know if the screens you’re capturing are marked as “secure” (usually screens with credit card or personal info would be marked as such)? If so, the preview of the screen won’t work because it relies on screenshots, which are prevented for secure screens.

In my case, even though I received that error message, if I clicked “OK”, I still see the tree of objects on the screen in the Mobile Object Spy. I can interact with those objects to create/save new Test Objects, even though I don’t see anything in the Device View window.

Are you not seeing anything in the All Objects pane at all? If that’s the case, you probably only have two options:

  1. Disable the “secure” setting on that particular screen for debug builds
  2. Manually create new Test Objects in the Object Repository: https://docs.katalon.com/display/KD/Manage+Test+Object

Hope this helps,

Chris

Screen Shot 2018-10-05 at 1.28.07 PM.png