This paper describes how to install on a Windows system appium by npm command line
Windows desktop select the corresponding version of the official website to download and install.
TestHome Baidu network disk download link
Tips: Appium desktop version requires Node.js environment before running.
First, the environmental requirements
- JDK
- Node.js
- android-sdk
- python 2.7
- .net framework 2.0
- VCbuild
Second, the installation process
Install JDK, and configure the environment variables.
Installation configuration Node.js:
Reference link: https: //www.cnblogs.com/zhouyu2017/p/6485265.html
Python 2.7 installation configuration
Because Appium during compilation need to use python 2.7 version 3.0 or later is not, can the Python computer to upload two versions.
Install android-sdk
Access http://www.androiddevtools.cn/ Download SDK Tools (24.4.1 Windows) archive:
Direct download link: https://dl.google.com/android/installer_r24.4.1-windows.exe?utm_source=androiddevtools&utm_medium=website
Open the unpacked SDK Manager.exe tick Tools, Platform, Build-tools directory can be downloaded.
*** download required, by Toos - setting domestic agent Download Options: Reference Links
Environment variable configuration (to extract to D: \ Application \ under, for example):
c新增 ANDROID_HOME = D:\Application\android-sdk-windows
Path increase:
% ANDROID_HOME% \ Tools
% ANDROID_HOME% \ Platform-Tools
% ANDROID_HOME% \ Build-Tools \ 26.0.1 (particularly with reference to the version number of a local directory)
.net framework 2.0 installed
Add .net framework 2.0 Function
Control Panel - procedures - programs and features can be determined by checking .net framework 3.5.
Such as adding failure error, you can download an Offline tool Win10_2016_Net3.5_x64_Offline.exe , need to restart the process!
VCbuild installation
because npm install Appium is compiled by node-gyp, you will need Python 2.7 and c ++ compiler environment.
There are two solutions under Windows, one is to install Visual Studio, the second is to install Visual C ++ Build Tools.
Unless there is a need to use VS, otherwise you can choose Option II.
Here we can choose to install Visual C ++ Build Tools .
[Baidu network disk link]
Select Check the Windows 8 SDK installation, Windows 10 SDK can (about several installation G, used to it, at least less than fully installed VS)
Installation appium
Open CMD:
Set npm Taobao mirror
npm config set registry https://registry.npm.taobao.org
Set vsbuild version before downloading the Visual C ++ Build Tools version that is how much how much is setnpm config set msvs_version 2015
Global npm install appium, use the command (default install the latest version):
npm install appium -g --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
To install version can be specified appium @ appium after adding a version number, such as installing version 1.7.2:
npm install [email protected] -g
Since chromedriver easy to download unsuccessful, it points to Taobao cdn download.
Appium after installation is complete, continue the installation appium-doctor
npm install appium-doctor -g
Use appium-doctor
check all configurations are correctly means that the installation was successful: