Appium Environment Installation

Source: Internet
Author: User
Tags install node appium

Update node mode


$ Brew Update
$ Brew Uninstall Node
$ Brew Install node
$ sudo brew postinstall node # BREW error message provided this recommendation; Only worked with Sudo

To test this npm is working (tho appears to build a index, which not everyone may want):
$ NPM Search # returns long list of packages
Above $ sudo brew postinstall node can repair NPM

Turn:

1. Climbing the Wall
Because the subsequent installation process may encounter wall problems, so the first to solve the problem of climbing the wall.
My convenience, the company provides the agent.

2. java

guowenxie-macbookair:~ guowenxie$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

3. Git

guowenxie-macbookair:~ guowenxie$ git --version
git version 1.8.5.2 (Apple Git-48)

4. Ruby

guowenxie-macbookair:~ guowenxie$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

5. Brew

guowenxie-macbookair:~ guowenxie$ brew -v
Homebrew 0.9.5

Here's the brew installation, brew is an essential Package manager for Mac OS
Execute the following command
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

6. Node
It's convenient to have a brew installation node.
brew install node

7. NPM

guowenxie-macbookair:~ guowenxie$ npm -v
2.0.0-alpha-5

8. Appium
You can now start installing Appium

guowenxie-macbookair:~ guowenxie$ appium -v
1.2.0

9. WD
NPM Install WD

Ten. Xcode and Android SDK
I'm not talking about this.

11. Check the Environment
Appium provides a doctor that runs Appium-doctor

guowenxie-macbookair:~ guowenxie$ appium-doctor 
Running iOS Checks
? Xcode is installed at /Applications/Xcode.app/Contents/Developer
? Xcode Command Line Tools are NOT installed: Error: Command failed: No receipt for ‘com.apple.pkg.CLTools_Executables‘ found at ‘/‘.
Fix it? (y/n) y
Press any key to continue: 
? Xcode Command Line Tools are installed.
? DevToolsSecurity is enabled.
? The Authorization DB is set up properly.
? Node binary found at /usr/local/bin/node
? iOS Checks were successful.
Running Android Checks
? ANDROID_HOME is set but does not exist on the file system at "Users/guowenxie/Documents/adt-bundle_mac-x86_64-20140702/sdk"
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.

Here you can see my Xcode Command line tools is not installed, this handy, Fix it? When you enter Y, you can automatically guide the installation.
Another is the ANDROID_HOME environment variable is not configured well, then we want to configure under.

. bash_profile file
Mac default is not this file, we build a
touch .bash_profile

vi .bash_profile
Open bash_profile file configuration android_home and Java_home
Export Android_home= "/USERS/GUOWENXIE/DOCUMENTS/ADT-BUNDLE-MAC-X86_64-20140702/SDK"
Export java_home=$ (/usr/libexec/java_home)

source .bash_profile
Okay, run Appium-doctor again.

guowenxie-macbookair:~ guowenxie$ appium-doctor 
Running iOS Checks
? Xcode is installed at /Applications/Xcode.app/Contents/Developer
? Xcode Command Line Tools are installed.
? DevToolsSecurity is enabled.
? The Authorization DB is set up properly.
? Node binary found at /usr/local/bin/node
? iOS Checks were successful.
Running Android Checks
? ANDROID_HOME is set to "/Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk"
? JAVA_HOME is set to "/usr/libexec/java_home."
? ADB exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb
? Android exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/android
? Emulator exists at /Users/guowenxie/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools/emulator
? Android Checks were successful.
? All Checks were successful

Here, the environment is basically ready.

Finally, if you do not want to install Appium from the command line, you can also install DMG

Appium Environment Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.