Troubleshooting issues when testing Android applications

You can find information about the issues or problems that you might face while you perform mobile tests for Android applications. Details about issues, their causes, and the resolutions that you can apply to fix the issues are described.

The troubleshooting issues are presented to you in the following table:

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 needs to capture the screens for recording the tests. For some Android applications, because the security flag is set, the screen cannot be captured. You must switch to the non-secured view of the application and continue with the recording.

When you record a mobile test on any Android application, if there are there two controls with the same name, 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 that have the same name.

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 click on 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 clicking one of the options in the pop-up frame. You might not be able to respond to the call because when you click the options in the pop-up frame, the option might not be clicked and the controls below the frame are clicked. 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.
When you play back a Web UI test in the Chrome browser that is installed on an Android device, the playback does not start and the unified report displays an error message. The unified report displays the following error message:

Error in launching Chrome. The browser might not be installed or you are using an unsupported version.

This issue is because the version of the Chrome browser on the Android device is different from the version of the Chrome driver.
You must perform the following steps:
  1. Download the appropriate Chrome driver.
  2. Provide the path and the file name of the Chrome driver in the environment variable WEBDRIVER_CHROME_DRIVER_MOBILE.
  3. Go to the directory path <installation directory>/node-js/appium-server, and then restart the execution agent.