Application installation and startup with Appium

Learn how to upload, install, and launch an app when working with Appium. You can also instrument an app. If you're using Selenium Remote WebDriver (RWD) or working in an environment where Appium capabilities aren't available, see Alternatives for installing, starting, and instrumenting an app.

Installing an application onto a Perfecto device via automation requires that the application file (for example, .apk or .ipa) be uploaded to the Perfecto repository. You can upload the application externally to the automation script by using the Perfecto UI (see Manage the repository) or REST API (see Upload Item to Repository), or as part of an Appium/Selenium automation script using the uploadMedia() method of the PerfectoLabUtils class.

Because Appium is designed for mobile application testing, the Appium drivers can automatically install and activate the application as part of the driver initialization process.

The AppiumDriver uses the app capability to identify the application file to install on the target device. Perfecto supports this functionality but requires that the file be stored in the Perfecto repository.

The AppiumDriver will then, normally, start the application on the device.

Other capabilities that affect the installation and launch of the application include:

  • fullReset: Indicates whether application should be uninstalled prior to installation. This guarantees that you work with a clean version of the application.
  • noReset: Indicates whether the status of the application should be cleared prior to starting the app.
  • autoLaunch: Indicates whether the application should automatically launched or not. Scripts that may need to set certain conditions prior to launching the app may use this to delay the application launch.

You also need to set the capabilities for appPackage (Android) or bundleID (iOS). For Android, you can specify the app activity in addition to the package name.

What's next

Upload the file to the Perfecto repository media folder