Installing Appium Server on Windows

In our Appium courses we use Appium Desktop as it provides a nice GUI wrapper around Appium Server and includes the Inspector for element identification and a step recorder. However, we may wish to integrate our Appium testing into Continuous Integration (CI) such as Jenkins. So we will want to start Appium from the command line. To do this we will need to use Appium Server instead of Appium Desktop. You can have Appium Server and Appium Desktop installed side-by-side.

This article shows you how to install and run Appium Server through the command line.

Step 1 – Install Node & NPM

Download latest node MSI from nodejs.org and install node. This will also install node’s npm tool (node package manager) which we will use to install Appium Server.

Appium Server is built on node.js so it is mandatory that we install it, before we install Appium.

node install

Ensure you select to install the npm tools and the system paths:

node install dialog

Once completed, the npm and nodejs paths should be in your PATH environment variable (done by installer)
System System Path: C:\Program Files\node.js
User System Path: C:\Users\<username>\AppData\Roaming\npm

Step 2 – Install Appium using node’s npm package manager.

Open a command prompt as an administrator. Then use the command:

npm install -g appium

install appium

Step 3 – Invoke Appium from the command line.

To start Appium, open a command prompt as an administrator, you can now simply run appium from the prompt e.g.

appium -a 127.0.0.1 -p 4723

where -a is the IP address (localhost in this case) and -p is the port number

If it runs successfully you should see something like this:

appium server running

There are many command line switches (arguments) that you can pass in to appium, see https://appium.io/slate/en/master/?ruby#server-flags for a full list of arguments. For example, you can use the following to tell Appium where to find your Chrome Server for mobile Web Testing:
–chromedriver-executable <path to chromedriver.exe>

To uninstall or update Appium you can use the npm package manager, for example:

npm uninstall -g appium

npm install -g appium@1.6

Where the @ can be used to choose a particular version to install