
And you would need to provide the main activity name (the activity which represents the app’s main screen) When you launch the app with Appium, it needs to know which activity has to be launched. For WhatsApp, it is the Chats window, and for Facebook it would be the Wall.

Together with these activities, every app has a main activity which is sort of the main screen you see when you launch the app. All these functionalities are represented by different appActivity. appActivity:Īgain, speaking in very basic terms appActivity refers to the different functionalities that are provided by the app.įor example, WhatsApp provides multiple functionalities such as conversations, profile information, setting profile photo, setting status, notifications and a lot of other things. So if you want to launch Facebook from Appium, you would need to provide it’s name as ‘’ in Appium. For Facebook, this name is ‘’ and for WhatsApp, the appPackage is – ‘com.whatsapp’.
Appium app wait activity for android#
It’s actually a top level package under which all the code for the app resides.įor example, appPackage for ‘YouTube’ for Android is ‘’. In very basic terms, appPackage is the technical name of the app which is provided by its developers. What is appPackage and appActivity name ? appPackage:

Before we start with these 2 methods, let’s first get some more detail about appPackage and appActivity. You can use any of these methods to find out the package and activity name of your app. This article lists down 2 different methods using which you can find appPackage and appActivity name of your app under test. Together with this package name, you will also need to provide the activity name of the app. You would need to provide this technical name (also known as package name). Internally, all the mobile apps use a different technical name. You just can’t provide the app name as ‘WhatsApp’ in your Appium code. When you write your code, you would need to provide the name of the app, and Appium would launch the app which matches the name you provided. Well, Appium also follow a similar process. Let us first see how you would do this manually? You would scroll through the list of apps installed on your phone, and then you will open the app which has the name ‘WhatsApp’. So Appium needs to figure out which is the correct app and then open it. To test this, your code would first launch WhatsApp and then it would verify your test case.īut how do you launch WhatsApp with Appium? Or to put this question in a different way, how would Appium recognize which app on your phone is WhatsApp? You might have tens of apps installed on your mobile device.

And your test case is to verify that you can send and receive messages. For example, let us suppose that you are testing WhatsApp. When you write test scripts with Appium, it usually involves launching an app and then performing some actions on it.
