Start the AVD, start the Appium, write the use case (Python), execute
First, start the Android simulator
Second, start Appium Server
Double-click the Appium icon to start, configure the Appium Android Settings, and the platformversion corresponding to the AVD configuration in the Target;device name corresponding to the AVD name in the AVD
General settings just keep it by default.
Click on the upper-right corner to start Appium, the default occupation of the local 4723 port, that is: 127.0.0.1:4723
Third, write Python code
Writing code in the Notepad or Python editor
#Coding=utf-8 fromAppiumImportWebdriver Desired_caps={} desired_caps['PlatformName'] ='Android'desired_caps['platformversion'] ='5.0.1'desired_caps['devicename'] ='Android Emulator'desired_caps['Apppackage'] ='Com.android.calculator2'desired_caps['appactivity'] ='. Calculator'Driver= Webdriver. Remote ('Http://localhost:4723/wd/hub', Desired_caps) driver.find_element_by_name ("1"). Click () driver.find_element_by_name ("5"). Click () driver.find_element_by_name ("9"). Click () driver.find_element_by_name ("Delete"). Click () driver.find_element_by_name ("9"). Click () driver.find_element_by_name ("5"). Click () driver.find_element_by_name ("+"). Click () driver.find_element_by_name ("6"). Click () driver.find_element_by_name ("="). Click () driver.quit ()
Four, the operation
CMD, enter Python d:\mk\test.py, run the app is the android comes with the calculator.
Appium Beginner (5)--appium test Case (1)