Windows Platform Configuration Appium+java environment

Source: Internet
Author: User
Tags install node appium testng

1) Installing the JDK

: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Installation: The JDK installation is simple and can be installed by default.
To configure environment variables:
Add Java_home variable, value: JDK installation path, such as: D:\Java\jdk1.7.0_45 (just example, change to your installation directory)
Add Classpath variable, value.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar
Modify the path variable, plus this sentence%java_home%\bin;
Check that the Java environment is configured, enter the cmd command line, enter Java or JAVAC, you can see a lot of command prompt, indicating success.

2) Install node. js

: https://nodejs.org

Install: By default, you can change the path of the installation.

After the installation is complete, check that the node version installation is successful: Enter cmd, enter node-v, you can see the version number, indicating success.

3) Install the SDK and Android API

: http://yunpan.cn/cV9RtJIQ9vd3v access Password: 2c91 (only Win64)

Install: Unzip the package directly to the installation directory.

To configure environment variables:

New variable: Android_home value: D:\AUTOTEST\ADT\SDK (Just an example, change to your installation directory)
Modify the Path value:%android_home%\tools;%android_home%\platform-tools

    1. Go to the SDK installation directory and run SDK Manager.exe
    2. Enter Tools-options and do the following settings.

HTTP Proxy Server Input mirrors.neusoft.edu.cn

HTTP Proxy Port Input 80

Also select Force https:sources to be fetched using HTTP ....

Last click Close closes the setting pop-up window

    1. Back to the main screen, select the Android API version you want to install and click Install N package. Such as:

    1. Then appear below this dlg, select "Accept Lisense", will all tick, click Install.

    1. Enter installation phase (may be slightly slower)

4) Networked Installation Appium

Install: Enter cmd command line, enter:

NPM Install–g Appium or

Wait a few minutes, log output can see Appium version 1.1.0 and installation directory

5) Check the environment

Start and check Appium:

Go to cmd command line, enter Appium

The following prompt appears: Welcome to Appium ... The instructions are ready to install.

Check the dependent environment:

Go to cmd command line, enter Appium-doctor

The following prompt appears: All Checks were successful indicates that the required environment has been successfully installed.

6) Install Apache Ant (This step can save)

: http://ant.apache.org

Install: Unzip to the installation directory.

To configure environment variables:

Variable ant_home value: D:\AutoTest\ant-1.9.4 (Just an example, change to your installation directory)

Set path:%ant_home%\bin;

Test whether the installation is successful, enter the cmd command line, enter ant, if not specified Build.xml will output: Buildfile:build.xml does notexist! Build failed

7) Install Apache Maven (This step can save)

: http://maven.apache.org/download.cgi

Install: Unzip to the installation directory.

To configure environment variables:
Variable m2_home value: D:\AutoTest\maven-3.1.1 (Just an example, change to your installation directory)
Set path:%m2_home%\bin;
Test if MAVEN is successful, run cmd, enter mvn-version If successful, environment information such as MAVEN version appears.

8) Install Ecplise

: Http://www.eclipse.org/downloads

Install: Unzip to the installation directory.

Configure workspace: Go to the Eclipse installation directory and click Eclipse.exe. The first boot will require that the project store directory be set up. For example: E:\workspace\

9) Install ADT Plugin

Online installation: (slower, also available as a second offline installation.) )

    1. Open Eclipse, menu bar Help->install New Software
    2. Then, in the popup window, click Add on the back of work with

Name:android

location:https://dl-ssl.google.com/android/eclipse/
Click OK.

    1. Select the ad that appears in the list
    2. T version, follow the prompts to install. Restart eclipse in effect.

Offline Installation:

: Https://dl.google.com/android/ADT-23.0.6.zip

    1. Open Eclipse, menu bar Help->install New Software
    2. Then, in the popup window, click Add on the back of work with
    3. Then click Archive to add the adt-23.0.6.zip you just downloaded
    4. After OK, write a name, such as Android
    5. After parsing, select the ADT version that appears in the list and follow the prompts to install it. Restart eclipse in effect.
10) Configure Appium Client,selenium

: Http://yunpan.cn/cVGaGYjF9mcgF access Password: 2d90

    1. New Project Appium (example name) in Eclipse step: file-new-Click Java project-enter project name-Click Finish
    2. Go to the-appium folder under the project storage directory set up above, for example: E:\workspace\appium

Create a new Lib directory and leave the Java-client-2.2.0.jar,selenium-java-2.43.1.jar,selenium-server-standalone-2.41.0.jar three jar packages in the Lib directory.

    1. Return to the Eclipse interface and right-Appium refresh until the Lib directory is displayed. Right-click on the Java-client-2.2.0.jar-build path-in the Lib directory to the add to Build Path

Repeat this step for each of the other two jar packages.

11) Configure JUnit or testng (choose the one you like)

JUnit Installation: High-version eclipse comes with no installation required.

TestNG Online Installation:

    1. Open Eclipse, menu bar Help->install New Software
    2. Then, in the popup window, click Add on the back of work with

Name:testng

Location:http://beust.com/eclipse
Click OK.

    1. Select the TestNG version that appears in the list and follow the prompts to install. Restart eclipse in effect.
Appium Related API documentation

Appium Client Part method: http://appium.io/slate/cn/master/?java#appium-Client Library

Appium Service keyword: http://appium.io/slate/cn/master/?java#appium-service key word

Appium element Positioning and Interaction: http://appium.io/slate/cn/master/?java# element Positioning and interaction

Selenium official api:https://selenium.googlecode.com/svn/trunk/docs/api/java/index.html?overview-summary.html

Windows Platform Configuration Appium+java environment

Related Article

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.