In fact, there are two main ways to install Appium:
1) Install your own NODEJS environment, and then use NPM to install the Appium
2) directly download the DMG provided by the official website to install, DMG has a NODEJS environment and appium executable files
Here we go to the point, respectively, two ways to explain the installation
1 Appium installation method one
This section focuses on the first of two ways of installing: Installing your own configuration Nodejs environment and then installing Appium via NPM
1.1 Nodejs Environment Construction
The Nodejs is: http://nodejs.org/download/
1) First go to Nodejs's official website to download the NODEJS compression package, click Download. tar.gz and extract to/application/devtools, the path can be defined according to personal preferences, this article takes/application/devtools as an example
2) Open the terminal to start the NODEJS environment configuration
A) Execute the following command to enter the home directory and open with Vim. Bash_profile
CD ~vim. Bash_profile
b) in Vim, enter the following to NODEJS environment configuration and save
Export node_home="/applications/devtools/nodejs"export PATH=${path}:${node_ Home}/bin
C) Execute the following command to make the environment configuration immediately effective
SOURCE ~/.bash_profile
After execution is complete, execute the command
Node--version
If the terminal output proves that the environment is configured successfully
Installation of 1.2 Appium
1) Execute the following command to install the Appium
Install -G appium
Terminal if output and no Error output indicates successful installation
1.3 Verifying that the Appium is installed successfully
Perform the following command at the terminal to check if the Appium installation is successful and the environment is configured to complete
Appium-doctor
If the terminal output, for example, all checks are green, the Appium is fully configured successfully.
2 Appium Installation Method II
The second way is to use DMG directly at the beginning of this article to install, DMG contains the Appium required Nodejs,appium Server, appium-inspector and other components
Installation of 2.1 Appium
Appium's DMG installation package is: https://bitbucket.org/appium/appium.app/downloads/
1) First until the author writes this blog post, the latest version of APPIUM.DMG is 1.3.1.
Specific installation mode I believe everyone Mac users are very clear, directly to the Appium icon in the direction of the arrow to move to the application folder icon.
2.2 Verifying that the Appium is installed successfully
1) Open the appium you just installed from the launcher, click the icon shown in the image to install the test
If the terminal is ejected and appears as indicating that the installation was successful.
3. Problems encountered during installation and workaround 3.1 compatibility issues
1) problem: because Appium 1.3.1 has not yet supported the Mac 10.10 system, it will make an error when monitoring
Workaround: According to the official said, this bug will be patched in Appium 1.3.2, for details see link: https://github.com/appium/appium/commit/ 7df67175b734a0fb131928a808ad23bc02187c35
Probably means, to nodejs the installation directory {Node_home}, modify the file/lib/node_modules/appium/lib/doctor/ios.js, in the file about the 36th line to add the following code:
In order to make it easier for everyone to copy past changes, the following key code is posted:
1 if(Err = = =NULL) {2 if(Stdout.match (' 10.8 ')!==NULL) {3 This. osVersion = ' 10.8 ';4cbNULL, "Mac OS X 10.8 is installed.");5}Else if(Stdout.match (' 10.9 ')!==NULL) {6 This. osVersion = ' 10.9 ';7cbNULL, "Mac OS X 10.9 is installed.");8}Else if(Stdout.match (' 10.10 ')!==NULL) {9 This. osVersion = ' 10.10 ';TencbNULL, "Mac OS X 10.10 is installed."); One}Else { A This. Log.fail ("Could not detect Mac OS X Version", CB); - } -}Else { the This. Log.fail ("Unknown SW Version Command:" +err, CB); -}
View Code
If you are installing via DMG, then the modified path is/applications/appium.app/contents/resources/node_modules/appium/lib/doctor/ios.js
2) problem: due to the problem of environment configuration, Appium-doctor is unable to obtain the file where the library is in the detection.
Workaround:
a) go to the home directory and open the. bash_profile
CD ~vim. Bash_profile
b), which shows the problem with the Java environment configuration, we just add the following line
Export java_home="/library/java/home"
Appium Installation-mac Platform