Skip to main content

Execute mobile tests with Appium

This document explains how to configure and execute mobile tests with Appium on Katalon Studio version 11.0.0.

Requirements​

warning
note

We recommend downloading and installing Node.js from the official website instead of using package manager brew or apk to avoid issues.

Install Appium and execute mobile tests​

Follow these steps:

1. Install Appium 3.x​

Run the following NPM command to install appium v3.0.0 globally:

npm i --location=global appium@3.0.0

2. Install Appium drivers (XCUITest and UiAutomator2)​

Appium 3.x does not come with drivers for mobile devices. Install XCUITest and UiAutomator2 separately for your testing device:

Run the following command to install the recommended version of the Appium UiAutomator2 driver (version 7.0.0):

appium driver install uiautomator2@7.0.0

The Appium UiAutomator2 Driver for Android native and web apps (via hybrid mode) is based on the Google UiAutomator framework. Refer to its Appium repository on GitHub to learn more.

3. Configure Appium location in Katalon Studio Preferences​

Appium should be installed at the following directories:

  • For Windows: C:\Users\<Your_Username>\AppData\Roaming\npm\node_modules\appium
  • For Mac/Linux: /usr/local/lib/node_modules/appium

Go to the directory on your device to verify, then make sure the path is configured in Preferences > Katalon > Mobile > Appium Directory.

Specify Appium directory in Preferences

Result​

You can now execute mobile test in Katalon Studio

To verify, execute your test in Katalon Studio, and switch to the Console tab and check if KS:

  1. Detects the NodeJS directory.
  2. Starts Appium.
  3. Loads all configured drivers.

In the Log Viewer, the example below shows that Katalon Studio has successfully started the application with Appium:

To learn more about execution logs in Katalon Studio, refer to View and customize execution log in Katalon Studio.

For troubleshooting, refer to Unable to Start Application on this device: Appium directory is invalid.

Was this page helpful?