Troubleshooting issues when testing Android applications

When you perform mobile tests on Android applications, you might face issues. You can find details about issues, their causes, and the resolutions that you can apply to fix the issues.

The following table lists the issues with resolutions:

Problem

Description

Solution

When you start recording the test, the recording does not continue and the following error message is displayed:

Screenshot cannot be captured for the recording because the security flag is set for the current view. To continue with the recording, switch to the non-secured view on the device and refresh the screen.

HCL OneTest UI captures the screens while recording the tests. If the security flag is set for the Android application, then HCL OneTest UI cannot capture screens. Check the Android application settings, and switch to the non-secured view of the application to continue with the recording.

When you record a mobile test on any Android application, if there are there two controls with same names, then the playback fails.

When the application screen has two controls with the same name, during the playback, the control that is on the active area of the screen is identified as the recorded control even though the other control was clicked during the recording.

For example, consider that an application has two Login buttons, one at the top of the page and another at the bottom of the page. While recording, if you clicked the second Login button and the first Login button was not visible in the active area, during the playback, both the Login buttons are visible and the playback considers the first Login button.

You must specify the location details for each of the controls with same names.

You must perform the following tasks:
  1. Click the step for which you want to add the location details.

    The User Action Details pane is displayed on the right side.

  2. Select at the specified index from the Object location list.
  3. Enter a value in the Index field.

    For example, for the first Login button, you can enter the value as 1 and for the second Login button, you can enter the value as 2.

  4. Save and run the test.
When you receive an incoming call on the application screen, you are not able to tap any of the options that are displayed on the pop-up frame. When you want to record an incoming call action, you can initiate a call to the device, and then you can respond to the call by tapping one of the options in the pop-up frame. You might not be able to respond to the call because when you tap the options in the pop-up frame, the option might not be selected and the controls below the frame are selected. You can add navigation actions to respond to the incoming call.
You must perform the following tasks:
  1. Click the step for which you want to add a navigation action.
  2. Click Insert > Navigation action.
  3. Select either Accept-Call or Decline-call in the Object's action list, and then specify the phone number in the from field.
  4. Save and run the test.