Introduction to the
Today is the college entrance examination due to precipitation around, particularly bad, you candidates come on for the college entrance examination, the national people’s Dragon Boat Festival is happy. We’ve recently cleaned up the automation stuff, and we’re nearing the end of the Python interface automation that we cleaned up. A new journey and chapter (Appium&python) is about to begin. The prime minister’s problem, then, is building the environment. I haven’t built environment for a long time and stepped on a lot of pits. Appium’s environment construction is quite complicated, and many peers are estimated to be stuck in the environment. So I would like to share with you ~~
Appium is arguably the most popular automation framework for apps. Its main advantage is that it supports Android and ios, and scripting languages also support Java and Python. And that skill is now in demand. Then there is the arrival of 5G. All kinds of apps borrow from it. So we have to master this skill. Hiro is good at Python, so the next tutorial is an example of Appium + Python.
The biggest difficulty in learning Appium is the installation and construction of the environment, 80% of people die in the installation and construction of the environment, and then no more; 10 percent of people are tortured by the environment, and finally die; Only the remaining 10% are good enough to be installed smoothly and in one step.
First, environmental preparation
Want to build the same environment as Macro brother, need to install the package of children’s shoes can: (1) scan code to pay attention to Macro brother public number, send: APpium environment family bucket, you can download; (2) Directly search on wechat: Beijing Hongge follow hongge public number, send: Appium environment family bucket, you can download.
1, Macro brother’s environment is Windows 10 version of the 64-bit system (32-bit students to find their own way)
2, 1.8.0_181 (64-bit)
3, the android – sdk_r24. 3.4 Windows
4, python: 3.7
5. Appium: 1.4.16.1
Node.js: node-v10.16.0-x64
7, Appium – Python – Client
Second, JDK installation
1, download the JDK package, xiaobian is 64-bit version 1.8, other advanced versions should also be possible. Select the version based on your system
2, all the way fool installation, pay attention to the installation path do not have Spaces, do not have Chinese. Don’t put the JDK and JRE in the same folder
3, set up three environment variables, my computer > select “properties” – > “advanced” – > “environment variables” – > “system variables” – > “new”
(1) JAVA_HOME—-D:\software\Java\jdk1.8.0_181 “(based on your installation path)
(2) CLASSPATH–; %JAVA_HOME%\lib; %JAVA_HOME%\lib\tools.jar;
(3) the PATH — — — — –; %JAVA_HOME%\bin; %JAVA_HOME%\jre\bin;
I’m going to add the two faces under path, but I won’t talk about them here
4. Open CMD to check whether the installation is successful. Enter Java -version and then javac
If the version number and the following help information are displayed, the installation is successful
Iii. Download and install the Android-SDK
1. Download the Android-SDK, which is a necessary environment for Android testing and development. If you don’t know how to download it, you can ask me for it
A lot of people download Android Studio directly, but to automate, you just need to download the Android SDK.
Download address: http://tools.android-studio.org/index.php/sdk/ (recommended)
2, after decompressing, there is an SDK manager.exe double-click open
3. Select the API version you want to download and the corresponding Android version, which will be used in the emulator later (use another emulator, or the real machine), and wait for the download. Install the Android SDK platform-tools and Android SDK build-tools under Tools. You can choose whether to update the Android SDK Tools. You are advised to directly update the Android SDK Tools. Install GoogleFQ: Extras folder: install all the Extras.
Iv. Android-sdk environment variables
D:\software\ android-sdK-windows (SDK installation path)
2. Add two variables to path. Add the two file paths indicated by the arrow below to path
D:\software\ android-sdK-windows \tools and D:\software\ android-sdK-windows \platform-tools, or %ANDROID_HOME% tools; %ANDROID_HOME%\platform-tools
5. Adb environment
Adb is in D:\software\ android-sdK-windows \platform-tools directory, so you can run adb directly in CMD.
2. Enter ADB on the CMD screen to view the version
6. Connect your mobile phone
1. Connect the phone to the computer with data cable. If you install 91 assistant or 360, you can download the phone driver first and confirm that the phone can be connected
2. Open CMD and enter: ADB Devices. If a string of characters appears on the screen, devices will be displayed.
The android test development environment is now installed. The next article will teach you how to set up the Appium environment. When you encounter a variety of strange problems during the installation process, read them carefully after the installation, starting from the first line and moving down step by step. If any of the environment problems occur, appium will eventually fail to run.
Appium (python+appium) QQ group communication :707699217
Seven, summary
1. Why environment variables are sometimes set and user variables are sometimes set when setting up a compilation environment?
A: Environment variables are divided into system environment variables and user environment variables. By environment variables you mean system environment variables, which apply to all users. User environment variables are only available to the current user.
Welcome to join this big family. Let’s swim the ocean of knowledge together.
Thank you for taking the time to read this article. If you think you have learned something from this article, it is also for rewarding the blogger for having a cup of coffee. Thank you!
If you find reading this helpful, please click on the lower left corner
“Recommended”Button yours
Will be my biggest writing motivation! Alternatively, you can choose
【Pay attention to my】, can be very easy to find me!
The copyright of this article belongs to the author and blogpark.
www.cnblogs.com/du-hongWelcome to reprint, but without the consent of the author, reprint the article must be in the article page after the obvious location to give the author and the original link, otherwise reserve the right to pursue legal responsibility!