How to setup an Appium Server?

How to setup an Appium Server?

Introduction

Appium Setup

Appium desktop has been deprecated due to security issues and is not advised to use on client machines. As an alternative Appium can be used from command line.

Note: If you encounter an error while installing uiautomator2, follow the steps below.

ERROR: “Encountered an error when installing package: npm command 'install --save-dev --no-progress --no-audit --omit=peer --save-exact --global-style --no-package-lock appium-uiautomator2-driver --json' failed with code EINVAL.”

  1. Open command prompt in “Run as Administrator” mode.
  2. Open this file in Notepad: C:\Users\<Username>\AppData\Roaming\npm\node_modules\appium\node_modules\teen_process\build\lib\exec.js.
  3. Change the shell property to “true” from “undefined” and save.

Leapwork + Appium Connection

Post successful startup of the Appium server, client URLs will be provided as output which can be used in Leapwork to establish a connection with Appium.

In Leapwork, go to settings → connections → add.

Upon clicking Test connection, the Appium server will respond with the below message to confirm a successful connection.

Note: As a prerequisite, NodeJS and npm should be present on the machine. To verify if npm is installed, open the Command Prompt and type npm --version. This command should return the version number of npm installed on your system.

If you have any questions, please reach out to our Priority Support team.