Appium+python Automation Environment Construction (small white applicable)

Source: Internet
Author: User
Tags windows x64 windows x86 appium

Write in front:

Did not start to listen to a lot of people said that learning appium80% people are dead in the environment, so at first very nervous, in the construction environment also did encounter several problems, because before I use the app to test little experience, so the equivalent of small app white, so some problems may be relatively small white, But accidentally card for half a day, so want to summarize under, convenient small white fools installation.

First, the Environment preparation:

1.WIN7 64-bit system

2.jdk1.8.0 (I use the latest version of the current website)

3.python3.6

4.appium:1.4.16.1

5.node.js:node-v4.4.7-x64

6.NET Framework 4.5

7.appium-python-client

Note: All software installation is best to set the installation path, do not default C drive, do not have Chinese, space, special characters and so on. I'm not going to mention it when I install it back.

Second, JDK installation

1.JDK Downloads

Directly to the official website to download, the current 1.8 download path is: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. Because there is no guarantee that this link has been available, after all, People's official website will be updated, so the proposal or direct Baidu jdk1.8, the first point of search results in the.

64-bit System Select Windows x64 that's it, remember to first select the above accept License agreement can. 32-bit system Select the download for Windows x86.

2. Installation

After the download is a step-by-step installation, here is the installation path problem, the installation path is best not to customize, do not have Chinese, spaces, special characters, etc., and JDK and JRE should not be placed in a folder. The following is my path, you can refer to the proposed path as concise as possible, so the configuration environment variable is also convenient point.

3. Configure Environment variables

There is a total of 3 environment variables to set, My Computer > select Properties, Advanced system settings, environment variables, system variables, new.

A. New Java_home property

Variable name:java_home

Variable value:F:\Java\jdk1.8(set according to the path your JDK has installed)

B. New Classpath property

Variable name:CLASSPATH

Variable value:.; %java_home%\lib;%java_home%\lib\tools.jar(Note that the characters are in English, this is not related to the installation path, so just match it)

C. Editing the Path property

Variable name:PATH

Variable value:%java_home%\bin;%java_home%\jre\bin(Note that the character is in English, this is not related to the installation path, directly add the new addition to this part of the current path to the last side of the path can be)

4. Verify that the installation was successful

cmd command, first java-version (note that there is a space between Java and-version),

Then enter the Javac command,

The above two commands, basically do not appear prompt: "XXX" is not an internal or external command, also is not a running program or batch file can be indicated. If it appears, basically is the environment variable configuration problem, remember to follow the above check.

Third, ANDROID-SDK download installation

1. Download ANDROID-SDK

Link: Https://pan.baidu.com/s/1d6fcH43jbUQYP6gTGjqszQ Password: YOS6

Here to share a network disk, Baidu should also be able to search.

Download good is a step-by-step fool installation, after installation, into the installation path, there is an SDK Manager.exe double-click Open,

Tick the API version you want to download and the corresponding Android version, then download it directly.

You can choose Android4.4.2 here.

In general, the installation is successful, the interface is open by default, you can check the Android4.4.2 to download it. If the speed is not good, you can download Google, you can also let others download a good copy for you to use.

2. Environment variable Configuration

A. New system variable Android_home

Variable name:android_home

Variable value:F:\AppData\Local\Android\android-sdk(Find yourself ANDROID-SDK installation path)

B. Editing the path ring Environment Variables

Variable Name: path

Variable value:; F:\AppData\Local\Android\android-sdk\tools; F:\AppData\Local\Android\android-sdk\platform-tools(set according to your own computer tools and Platform-tools path, add it at the end of the path variable)

3. Verify the ADB environment

First, the cmd command enters ADB, the version number appears, and the installation path indicates success.

Iv. connecting the mobile phone

First of all: we appium automation is only for Android phones, Apple phones are not available, do not ask why.

1. Connect your phone

If you don't have a phone driver installed on your computer, you'll need to install the 91 phone Assistant first: http://zs.91.com/. Home page that one is okay.

The connection is successful and your phone model version is displayed in the upper left corner. Need special attention: mobile phone development mode on, USB debug mode must be open, or not connected.

2. Verify that the connection is successful

Open cmd, enter ADB devices (note that there are spaces between ADB and devices), when a string of characters appears on the screen, followed by a devices indicating that the connection was successful.

If you do not have the following string of characters, only the first line of content, that means that your connection is out of the question.

The method is to re-unplug the data line to try, or to see if your data driver is not installed, mobile phone development mode open, USB debugging mode is not open.

For additional questions, refer to: https://www.cnblogs.com/mgzc-1508873480/p/6994597.html

V. Installation of Python

1. Download

Official website: https://www.python.org/

I am using the python3.6 version. Basic is the default next to be able to, here specifically, it is best to check the automatic addition of environment variables, more convenient, or need to configure themselves. Here I was checked, so the installation is not configured after the environment variables, if not checked, you need to configure, do not forget.

2. Verify that the installation was successful

CMD, enter the python command, the version number, and then enter print ("Hello world!"), the result, indicating that the installation was successful.

Vi. installing node. js

1. Download

Official website: https://nodejs.org/en/download/,

Then you can install it by default in one step.

2. Verify that the installation was successful.

cmd command, enter NODE–V (note that there are spaces between node and-V), and then enter the NPM command,

3. A message appears indicating that node. JS installation was successful.

Vii. installation of Appium

1. Download and install

: https://bitbucket.org/appium/appium.app/downloads/

2. Directly double-click the Appium-installer.exe file to install it, the desktop will generate a appium icon,

Viii. installation of the. NET Framework

Appium is developed with. NET, so you need to install. NET framework4.5,:https://www.microsoft.com/zh-cn/download/details.aspx?id=3065332

Download the installation directly and you can. If you have a. NET installed before your computer, you may be prompted that you are already installed or have a later version, so you do not have to install it again.

Nine, Appium-doctor

1.appium after installation, locate the directory where the. Bin is located,

2. Environment variables

Add the above path F:\softwore\Appium\node_modules\.bin to the environment variable path.

Variable name:path

Variable value:; F:\softwore\Appium\node_modules\.bin(added to the last side of the path path)

3. Verify that the installation was successful

cmd command to enter Appium-doctor (note there are no spaces between Appium and-doctor)

For example, a red box appears in the section to indicate success.

X. Installation of Appium-python-client

If the previous Python environment is successfully installed, it means that Pip is ready, then open cmd directly, enter: Pip install appium-python-client

Here the installation of the software has been installed, Appium environment has been built.

Special Note:

This blog post reference Blog Park God: Shanghai-leisurely

See the original Blog address:

Http://www.cnblogs.com/yoyoketang/p/6128725.html

Http://www.cnblogs.com/yoyoketang/p/6128730.html

Appium+python Automation Environment Construction (small white applicable)

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.