Robotframework Frame Installation
Robotframework Framework Installation documentation Many can be self-Baidu, the most convenient is to use PIP installation, will automatically download the installation of the dependency package
Robot Framework installation PIP Command pip install robotframework-i http://mirrors.aliyun.com/pypi/simple--trusted-host Mirror S.aliyun.com
Wxpython installation (to support Robotframework IDE ride) Select the corresponding version to http://wxpython.org/download.php#stable
Robotframework-ride install PIP command: pip install robotframework-ride-i http://mirrors.aliyun.com/pypi/simple-- Trusted-host mirrors.aliyun.com
Appium-python-client install PIP command: pip install appium-python-client-i http://mirrors.aliyun.com/pypi/simple-- Trusted-host mirrors.aliyun.com
Robotframework appiumlibrary install PIP command: pip install robotframework-appiumlibrary-i http://mirrors.aliyun.com/pypi/ Simple--trusted-host mirrors.aliyun.com
Confirm that the Appiumlibrary is installed successfully
Run ride First, command line input ride.py
Then import appiumlibrary if the import three-party library is black, the installation is successful
Appium related Preparations
Mac version Appium and Android Studio
Http://pan.baidu.com/s/1kUzIgYj
JDK installation and environment variable configuration
environment variable Settings command, open the. bash_profile file and add
Export ANDROID_HOME=/USERS/SPOOK/LIBRARY/ANDROID/SDK
Export Java_home=/library/java/javavirtualmachines/jdk1.8.0.jdk/contents/home
View the SDK and JDK environment variables after the configuration is successful
Appium self-band test doctor results
Prompt all check success indicates that the environment is OK
Connection settings
Appium settings
Default port 4723, for Robotframework call Appium,
Android settings
Connection Appium
Applying the Inspector positioning element with Appium
The new session appears to indicate that the connection is OK
Element positioning
Both IDs and XPath can be
Online customer service in line demo
Settings * * *Library appiumlibraryVariables * * *${remote_url} http:localhost:4723/wd/hub${platform_name} android${platform_version}19${device_name} bendawang${apppackage} com.dianping.v1Test Cases * * *app-inch-2${app} Open application Remote_url=${remote_url} platformname=${platform_name} platformversio=${platform_version} Devicename=${device_name} AppP Ackage=${apppackage} sleep3Comment page should contain element/android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.tabhost[1]/ android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.relativelayout[1]/ android.support.v7.widget.recyclerview[1]/android.widget.linearlayout[4]/android.widget.linearlayout[1]/ android.widget.linearlayout[2]/android.widget.linearlayout[1]/android.widget.linearlayout[2]/ Android.widget.linearlayout[1]/android.widget.relativelayout[1]/android.widget.imageview[2] Wait until keyword succeeds2 min 5 sec click Element id=home_tab_my Comment click Element ID=Home_tab_my Sleep5Comment page should contain elementandroid.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.tabhost[1]/ android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.linearlayout[1]/android.widget.relativelayout[1]/android.widget.linearlayout[1]/ Android.widget.textview[1] Wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.tab host[1]/android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.linearlayout[1]/android.widget.relativelayout[1]/android.widget.linearlayout[1]/ Android.widget.textview[1] Sleep5page should contain text customer service center Comment Wait until page contains element XPath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.widget.listview[1]/ ANDROID.VIEW.VIEW[2]/ANDROID.VIEW.VIEW[1] 50wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.fra melayout[1]/android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.widget.listview[1]/ ANDROID.VIEW.VIEW[2]/ANDROID.VIEW.VIEW[1]#Select a purchase voucherSleep 5Comment Wait until page contains element XPath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.widget.listview[3]/ ANDROID.VIEW.VIEW[1] 50wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.fra melayout[1]/android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.widget.listview[3]/ ANDROID.VIEW.VIEW[1]#Connect online customer serviceSleep 5page should contain text online customer service sleep5wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.fra melayout[1]/android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.view.view[5]/ Android.widget.image[1] Sleep5Comment Wait until page contains element XPath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ ANDROID.WIDGET.FRAMELAYOUT[1]/ANDROID.WEBKIT.WEBVIEW[1]/ANDROID.VIEW.VIEW[1]/ANDROID.VIEW.VIEW[7] 50wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.fra melayout[1]/android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ Android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.view.view[7] Sleep5Input Text XPath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.framelayout[1]/ android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ Android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.view.view[8] APP \ autotest Sleep3wait until keyword succeeds2 min 5 sec click Element Xpath=//android.widget.linearlayout[1]/android.widget.framelayout[1]/android.widget.fra melayout[1]/android.widget.framelayout[1]/android.widget.linearlayout[1]/android.widget.linearlayout[1]/ Android.widget.framelayout[1]/android.webkit.webview[1]/android.view.view[1]/android.view.view[10] Sleep10[Teardown] Close all applications
"Mac" Appium integrated robotframework Environment preparation