Appium Environment Configuration

Source: Internet
Author: User

First, JDK download, installation and environment configuration

1, download, install skip ...

2, the environment configuration, take jdk-8u45 as an example, by default installed in the C:\Program files\java\jdk1.8.0_45\ path. Set Environment variables below:

My Computer Right-click menu---> Properties---> Advanced---> Environment variables---> System variables:

Variable name: java_home
Variable Value: C:\Program files\java\jdk1.8.0_45\
Variable name: PATH
Variable value:%java_home%\bin;%java_home%\jre\bin;
Variable name: Calss_path
Variable value:.; %java_home%\lib\tools.jar;; %java_home%\lib\dt.jar

To determine if the JDK is installed, enter java-version and if you can return to the Java version information, the installation succeeds.

Second, android-sdk download, installation and environment configuration

1, download, install skip ...

2, the SDK environment configuration: Take android-sdk_r24.2 as an example, by default installed in the D:\Program files\android-sdk-windows\ path. Set Environment variables below:

Variable name: android_home
Variable Value: D:\Program files\android-sdk-windows\
Variable name: PATH
Variable value:%android_home%\tools;%android_home%\platform-tools;%android_home%\build-tools\22.0.1;

Three, Android Simulator (AVD) configuration

1. Start the Android SDK Manager, open the main interface, select "Tools", then "Options ..." and pop up the "Android SDK manager-settings" window;
2. In the "Android SDK manager-settings" window, in the "HTTP proxy server" and "http proxy port" input box, fill in the above mirror server address (does not contain HTTP//, such as) and port, and select " Force https://... sources to be fetched using HTTP/... check box. Click the "Close" button to close the "Android SDK manager-settings" window and return to the main screen after Setup is complete.
3. Select "Packages" and "Reload" in turn.

Android SDK Update mirror server online
      1. Open Source Association of CAS image station address:

        • Ipv4/ipv6: http://mirrors.opencas.cn Port: 80

        • Ipv4/ipv6: http://mirrors.opencas.org Port: 80

        • Ipv4/ipv6: http://mirrors.opencas.ac.cn Port: 80

      2. Shanghai GDG Mirror server address:

        http://sdk.gdgshanghai.comPort: 8000

      3. Beijing University mirror server address:

        • IPV4: http://ubuntu.buct.edu.cn/ Port: 80

        • IPV4: http://ubuntu.buct.cn/ Port: 80

        • IPV6: http://ubuntu.buct6.edu.cn/ Port: 80

      4. Dalian Neusoft Institute of Information Mirror server address:

        http://mirrors.neusoft.edu.cnPORT: 80

Iv. use of the Android Simulator (AVD)

1, launch the Android SDK Manager, open the main interface, select "Tools", "Manage SDK ...", pop up the "Android SDK Manager" window;

2, ANDROID-SDK only installed the Android SDK Tools package, leaving us with the remaining two kits, open the SDK Manager, check the installation of Android SDK Platform-tools, Android SDK Build-tools, then select an Android virtual image, because Appium and a lot of tools only support API 17, Android 4.2.2 and above, so we'd better install 4.2.2 and 4.2.2 more virtual images.

3, after the installation is complete, new virtual system and boot skip (boot too slow) ...

4. How to install and delete apps in the Android Emulator (may use:)):

(1), install Android app
① launch Android Emulator
②ADB Install (apk on the PC Path/) *.apk (upload the apk file to the Data/app directory of the emulator's own operating system)
Explore the APK app in the ③android emulator interface

(2), delete Android app
There are several ways to remove Android.
The first type: command line with Uninstall
The package name of the ADB uninstall APK (viewed in the EC switch to Ddms File Explorer, Data/data)
The second type: command line into the emulator operating system
ADB shell (into the emulator's own operating system)
CD data/app (switch to APK's installation directory)
RM ***.apk (view with EC switch to Ddms's file Explorer, Data/app)
The third type: 1.1 above the emulator is deleted, very simple
Simulator Setting, applications, Manage applications, XXX program, Uninstall
This will allow you to delete the.

(3), upload files to the specified directory
ADB push d:\.a.txt/sdcard/
(View directory method adb shell into shell command mode #ls view)

V. Appium download, installation and environment configuration

1, to http://appium.io/official website, download Appium installation.

2. Environment configuration:

Before starting Appium, it is best to click the android Settings button, configure the capabilities and advanced options, capabilities in the same as your AVD-initiated Android or real machine version, Advanced inside to add your Android SDK installation path, so the probability of a problem is smaller.

  

3, start successfully, with browser access to http://127.0.0.1:4723/, prompt:

That URL does not map to a valid JSONWP resource

    

Appium Environment Configuration

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.