Appium includes 2 major components, Appium Inspector and Appium Server (its version with interface is also called Appium Desktop). The former is used to analyze the elements in the mobile App interface to assist in the development of automated test scripts; the latter is a server that accepts requests from scripts and manipulates the App UI.
Appium Server uses the WWP protocol (WebDriver Wire Protocol) consistent with Selenium to accept operation requests in JSON format, and after parsing, execute them on the connected mobile phone. Appium also provides many API libraries in different languages for writing test scripts. These codes are essentially using the WWP protocol to communicate with Appium Server.
Therefore, you can even register it to Selenium Hub Appium Server . Thus, in Appium test script, can be programmed to access the Selenium the Grid , to find and use with the specified test capabilities (e.g. { "platformName": "iOS" , "deviceName": "iPhone 7"}) of Appium Node .
Appium environment deployment
- Download JDK 11 from Oracle website , install and record the directory as Dir1;
- Download and install Android Studio from Google developer site
- Open Android Studio and select SDK Manager in the More Actions menu;
- Click the Edit Android SDK Location open the following window;
- The Anroid SDK Location directory at the bottom of the record is Dir2, which can be modified to the path you think is appropriate;
- Then all the way to Next, complete the configuration and download;
Set the JAVA_HOME and ANDROID_HOME environment variables, and add java and adb executable files to the PATH environment variable:
Windows system- Enter sysdm.cpl on the command line to open the system properties window;
- Click advanced label, environment variable button in turn to open the environment variable editing window;
- user variable list at the top, click the New button. Input variable name and variable value into JAVA_HOME and JDK installation directory Dir1 respectively, and save;
- Refer to the previous step to create a new environment variable named ANDROID_HOME, the variable value is the installation directory Dir2 of the SDK Manager in the Android Studio;
- user variables at the top, select the Path variable and click the edit button to open the modification window;
- Append %JAVA_HOME%\bin and %ANDROID_HOME%\tools to the Path variable. In Win7, it is a single-line editing mode, please use English semicolons to separate the paths;
- Reopen the command line window to make the environment variable settings take effect.
Linux, Mac system
- Edit the .bash_profile file in the user directory;
Add the following content at the end of the file, and modify the values of JAVA_HOME and ANDROID_HOME to the Dir1 and Dir2 recorded previously;
export JAVA_HOME=/Users/aaron/rd/sdk/jdk11 export PATH=$JAVA_HOME/bin:$PATH export ANDROID_HOME=/Users/aaron/rd/sdk/android export PATH=$PATH:$ANDROID_HOME/tools
- Execute source ~/.bash_profile to make the setting effective.
Plug in the mobile phone and execute the following commands respectively to confirm that the environment variables are set successfully;
macbook:~ aaron$ java --version java 11.0.7 2020-04-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)
macbook:~ aaron$ adb devices List of devices attached a0c865fd device
- From here download Appium Inspector, and installation;
- Download Appium Server from here , and install it.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。