Skip to content

How do I open a closed mobile application?

In this example, we will open the HICC Prod application by using the startActivity command.

App package name is a unique identifier which looks like this ‘com.eureqa.eureqaprod’. This ID uniquely identifies the app present in storage.

Furthermore, each Android App contains various ‘Activities’ or simply put ‘Pages’ which users can access by performing actions or by navigating through the app. It is a single, focused thing that users can view at once.

For example, in HICC app, the main page (.MainActivity) is where we can enter values and the results page (.ResultActivity) is where we can verify the outputs.

Solution:

# Command Target Value
Start activity of the HICC Prod Application
1 startActivity com.eureqa.eureqaprod .MainActivity

Note: This command is supported only for Android Devices.

Tips, Tricks, Gotchas & Best Practices:

  • If you are unsure about app package name and activity, you can store the details of the application by using storeCurrentPackage and storeCurrentActivity commands and call them in the automation when required.
  • To switch between applications in the iOS devices, you have to develop a script that simulates the user accessing app switcher manually, and switching to the other app or manually select from the home screen since startActivity is not supported for iOS devices.

Feedback and Knowledge Base