There is a delay in updating articles on this site, if you want to see articles about Python + Appium, please follow me over to Testhome.
Install and configure the JDK
1. Installation environment
1. Local system: Windows 10 (64-bit)
2. JDK version: 1.8 (64-bit)
Download and install
1. Introduction to JDK and JRE
Java environment is divided into JDK and JRE, JDK is Java Development Kit. Simply put, the JDK is an SDK for developers to use, which provides the Java development environment and runtime environment. JRE is a Java Runtime environment for Users of Java programs.
2. JDK official website
www.oracle.com/java/techno…
3. Download the JDK version corresponding to the local system:
4, installation,
Set the installation path (it is recommended to install to disk C) and click Next to complete the installation. After the installation is complete, the following two folders will be generated in the folder
3. Configure the environment
1. Set environment system variables
Click “My computer” right-click menu –> Properties –> Advanced –> Environment Variables –> System Variables –> New
Create the following content:
Variable name: JAVA_HOME Variable value: D:\\ Java\\jdk1.8.0_101 (where you installed the JDK) Variable name: CALSS_PATH Variable value:. %JAVA_HOME%\\lib; %JAVA_HOME%\\lib\\tools.jarCopy the code
2. Set the environment variable path
System variables – > Path variable name – > Edit Add:
Variable value: %JAVA_HOME%\\bin; %JAVA_HOME%\\jre\\bin;Copy the code
3. Check whether the installation is successful
Windows+R, enter CMD, run CMD: Java -version (there is a space between Java and -version)
If the version information is displayed, the installation and configuration are successful, as shown in the following figure:
Install and configure Node.js
1. Installation environment
1. Local system: Windows 10 (64-bit)
Node.js: V12.16.1 (64-bit)
Download and install
1. Introduction to Node.js
Node.js is a platform built on the Chrome JavaScript runtime. Node.js is a non-blocking, event-driven I/O server-side JavaScript environment based on Google’s V8 engine, which executes JavaScript very fast. Very good performance.
Event-driven: The server responds only when an event occurs on the user’s side
Non-blocking: Node.js applications are developed in javascript and run directly on Google’s perverted V8 engine. With Node.js, you don’t have to worry about client requests running through a block of code on the server. Think of a non-blocking server as a loop that runs forever. When a new request comes in, the loop picks it up, passes the request to another process (such as a database query process), and responds with a callback. When it’s done, the loop continues to run, taking other requests. So let’s go like this. The server will not wait for the database to return results as it did before.
Node.js official website
Nodejs.org/en/download…
3. Download the node.js version of the local operating system
4, installation,
Once the file is downloaded, double-click the.msi file to install it, and keep clicking Next. Note: Install nodejs in the develop folder on drive D:\ develop \
Note the following screenshots:
'NPM Package Manager' stands for NPM package manager 'online Documentation Shortcuts' Add to PATH' Add node installation PATH to environment variablesCopy the code
After the installation is complete, node.exe has been added to the system environment variable path by the installation package in.msi format. If not, you need to manually add it (choose System variable > Path variable name > Edit path to add Node), as shown below:
5. Test whether the installation is complete
Windows+R, enter CMD, run CMD: node -v (there is a space between node and v)
The installation is complete as shown in the figure
The installation directory is as follows:
** New versions of Node.js come with NPM, which is installed with node.js when installed. NPM is used to manage node.js dependent packages
6. Introduction to NPM
NPM is a package management tool for Node.js, which can solve many problems in node code deployment. Allow users to download third-party packages written by others from NPM servers for local use; Allows users to download and install command line programs written by others from the NPM server for local use. Allows users to upload their own packages or command-line programs to the NPM server for others to use.
Three, environment configuration
1. The environment configuration here is mainly to configure the path of the global module installed by NPM, and the path of the cache cache. The reason for the configuration is that the implementation of similar in the future: NPM Install Express [-g] (optional -g, g indicates the global installation), the installed module will be installed in the [C: Users\ User name \AppData\Roaming\ NPM] path, occupy disk C space.
2. Create two empty folders [node_global] and [node_cache] in node.js folder, as shown below:
Use the following command to configure the NPM global module directory and cache directory to the two directories we just created
npm config set prefix "D:\\Develop\\nodejs\\node_global"
npm config set cache "D:\\Develop\\nodejs\\node_cache"
Copy the code
3. Set environment variables
“My Computer” – right-click – “Properties” – “Advanced System Settings” – “Advanced” – “Environment Variables”
Create a new NODE_PATH under system Variables and type D:\Develop\nodejs\node_modules
Change Path to D:\Develop\nodejs\node_global
4. Check whether the test environment is configured
After the configuration, install a Module test, we will install the most commonly used Express module, open CMD window, enter the following command to install the module globally:
NPM install express -g # -g
Install and configure the Android SDK
1. Installation environment
1. Local system: Windows 10 (64-bit)
2, 3.5.2 For Windows 64-bit (718 MB)
Download and install
1. Introduction to Android SDK
The Android SDK (Software Development Kit) provides Android API libraries and Development tools to build, test, and debug applications. In simple terms, the Android SDK can be viewed as a piece of software for developing and running Android applications
2, Android SDK official website
Developer.android.com/studio?hl=z…
3. Install the SDK
Download Android Studio and start the installation. If you need to install your own emulator, check this box and Next. (If you need to use emulators, check the second box.)
Note: Next, go to the SDK selection page and pay attention to select Custom, so that you can only install your favorite parts, then select theme, of course, this can be changed in Android Studio later
Next, go to the custom components page and set up the SDK installation path as shown below. For example, mine is D:\Android\SDK
4. Display the folder after installation
3. Configure the environment
1, click “My computer” right menu –> Properties –> Advanced –> Environment Variables –> System Variables –> New
Variable name: ANDROID_HOME
Variable value: D: \Android \Android_SDK (where you installed the SDK)
2. Configure the PATH environment
System variables –> Path variable name –> edit Add:
Variable value: %ANDROID_HOME%\\platform-tools %ANDROID_HOME%\\tools %ANDROID_HOME%\\build-tools %\ 28.0.2Copy the code
Note: Check the version number: D:\Android\SDK\build-tools
3. Check whether the installation is successful
Run CMD and enter adb –version (there is a space between ADB and version). If the following version information is displayed, the installation is successful
Install and configure Python
1. Installation environment
1. Local system: Windows 10 (64-bit)
Python3.8 for Windows 64-bit
Download and install
1. Introduction to Python
Python is a high-level scripting language that combines interpretation, compilation, interactivity, and object-oriented programming. There is no compilation in the development process. Many Python editors are recommended: PyCharm, Atom, Sublime Text3, etc
2, Python official website, download address
3, installation,
After the download is successful, click [Next] to install it successfully
Three, environment configuration
1. Add the PATH environment variable
System variable -> Path variable name -> Edit add
Variable value: D:\Python3 (your installation path)
2. Check whether the installation is successful
Windows+R, enter CMD, run CMD, enter python
Install and configure PyCharm
1. Installation environment
1. Local system: Windows 10 (64-bit)
2. PyCharm 2019
Download and install
1. PyCharm
PyCharm is a Python IDE that comes with a full set of tools to help users improve their productivity while developing in Python, such as debugging, syntax highlighting, Project management, code jumps, smart hints, autocomplete, unit testing, version control, and more. In addition, the IDE provides advanced functionality to support professional Web development within the Django framework.
2. PyCharm
www.jetbrains.com/pycharm/dow…
Install PyCharm
Double-click the application and press Next. Note the following
4. Break PyCharm (see README)
(1) First download the zip package and unzip it to get JetBrains – Agent. jar. Put it in the folder you think is appropriate. IO /2018/08/17/…
(2) Start your IDE. If you need to register, select Evaluate for Free to enter the IDE.
(3) Click on the IDE menu you want to register: Configure or Help -> Edit Custom VM Options… Click Yes if prompted to create a file.
(4) Add the following at the end of the vmOptions editing window:
Example: MAC: - javaagent: / Users/neo/jetbrains - agent. The jar Linux: - javaagent: / home/neo/jetbrains - agent. The jar Windows: -javaAgent :C:\ Users\ neo\ jetBrains -agent.jar -javaAgent :C:\ Users\ neo\ jetBrains -agent.jar [<https://intellij-support.jetbrains.com/hc/en-us/articles/206544519>](<https://intellij-support.jetbrains.com/hc/en-us /articles/206544519>)Copy the code
(5) Restart your IDE.
(6) Click on the IDE menu Help -> Register… Or Configure -> Manage License… Two registration modes are supported: License Server and Activation Code
-
Select the License server mode and fill in the address: fls.jetbrains-agent.com (use the second mode if the network is not good)
-
If you select Activation code for offline Activation, use the registration code in activation_code. TXT to activate the Activation code. If the activation window keeps popping up (Error 1653219), go to the hosts file and remove the jetBrains related projects. License key is in Legacy format == key invalid: the agent configuration does not take effect.
Install and configure Appium
1. Installation environment
1. Local system: Windows 10 (64-bit)
2, Appium V1.18.1
Download and install
1. Introduction to Appium
Appium is an open source, cross-platform (test program cross-platform, support app testing on multiple platforms), multi-language support (development language) mobile application automation tool.
2. Appium official website
Github.com/appium/appi…
3, installation,
Keep clicking on [Next]
3. Configure the environment
1. Install Appium
Install the latest version
cnpm install -g appium
Install the specified version
CNPM install [email protected] – g
If the following command is displayed, the installation is complete.
Problems:
CNPM is not an internal or external command and is not an executable program, as shown in the following figure:
Solution:
If there is no CNPM package, you need to install CNPM: command line: NPM install -g CNPM. The following figure shows that the installation is successful
2. View the installation path of Appium
Available command: where appium
3. View the version number of Appium
Appium -v Check version (there is space between appium and v)
If “Appium is not an internal or external command, an executable program, or a batch file” is displayed after you enter appium, set the installation Path of appium to the system environment variable Path, for example, C:\Users\Shuqing\AppData\Roaming\ NPM
4. Install appium-python-client
Run the PIP install appium-python-client command to install the software
After the installation, run the following command to check whether the installation is successful.
Enter python – > from appium import webdriver and press Enter. If no error message is displayed on the console, the installation is successful
5. Install appium-doctor
Appium-doctor can detect the overall appium dependent environment configuration.
Run the CMD command: CNPM install appium-doctor -g to install it
On the console, enter the command appium-doctor. If the following information is displayed, the overall environment configuration is successful.
If X is displayed for any of the preceding items, the related environment is not configured properly. You need to reinstall the configuration.
Welcome to point out the wrong places!!