#Windows Setup
Appium on Windows supports both Windows and Android app automation!
See Windows App Testing for more details.
To get started:
- Download latest node and npm tools MSI (version >= 6.0). The
npm
andnodejs
paths should be in your PATH environment variable. - Download 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
ANDROID_HOME
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. - Open admin cmd
- run command: npm install -g appium
- run command: appium
- Run a test from any Appium client (including Visual Studio)
- 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 orgreater. Then run Appium on the command line (via the
appium
command) - Within test script, change value of 'platformVersion' to correspond with emulator version (i.e. '4.4.4')
- Within test script, change value of 'app' to PATH('path of .apk') and ensure the entire path (including close parenthesis) is on one line
- To test a Windows app, make sure you have turned developer mode on.
See the server documentation for all the command line arguments.
- URL endpoint has to append "/wd/hub"
- DesiredCapabilities:
- platformName = "Windows"
- deviceName = "WindowsPC"
- On windows run appium.app as administrator or when running from source you need to run cmd as 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.
- Make sure that
hw.battery=yes
in your AVD'sconfig.ini
.