Windows Setup
Appium on Windows supports both Windows and Android app automation!
See Windows App Testing for more details.
Running Appium on Windows
Setup
To get started:
- Download latest node and npm tools MSI (version >= 6.0). The
npm
andnodejs
paths should be in your PATH environment variable. - Open admin cmd prompt
- Run the command
npm install -g appium
which will install Appium from NPM - To start Appium, you can now simply run
appium
from the prompt. - Follow the directions below for setup for either Android or Windows app testing.
- Run a test from any Appium client.
Additional Setup for Android App Testing
- Download the latest Java JDK here (accept the license agreement first). Set 'JAVA_HOME' to be your JDK path. The
bin
in that directory should be added to your PATH variable. - Install the Android SDK. Set the
ANDROID_HOME
environment variable to be your Android SDK path and add thetools
andplatform-tools
folders to your PATH variable. - Install Apache Ant or use the one that comes with the Android Windows SDK in the eclipse\plugins folder. Be sure to add the folder containing Ant to your PATH variable.
- Install Apache Maven and set the M2HOME and M2 environment variables. Set
M2_HOME
to the directory maven is installed in, and setM2
to thebin
in that directory. Add the path you used forM2
to your PATH. - To run tests on Windows, you will need to have the Android Emulator booted or an Android Device connected that is running an AVD with API Level 17 or greater. Then run Appium on the command line (via the
appium
command) - Your test script should ensure that the
platformVersion
capability corresponds to the emulator or device version you are testing, and that theapp
capability is an absolute path to the .apk file of the Android app.
Additional Setup for Windows App Testing
- To test a Windows app, simply make sure you have turned developer mode on.
(see the Windows app testing doc for instructions on how to run Windows app tests)
Running Appium
See the server documentation for all the command line arguments.
- On Windows run Appium.exe as an administrator, or when running from source you need to run cmd as an administrator.
- You must supply the
--no-reset
or--full-reset
flags for Android to work on Windows. - There exists a hardware accelerated emulator for Android; it has it's own limitations. For more information you can check out this page.