用pycharm工具进行编写,运行一个开启淘宝app实例
from appium import webdriver
desired_caps = {
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "U4KF9HSK99999999", #真机设备名称 通过adb devices获取
"appPackage": "com.taobao.taobao",
"appActivity": "com.taobao.tao.welcome.Welcome",
"noReset": False
}
driver = webdriver.Remote(‘http://localhost:4723/wd/hub‘, desired_caps)
运行前先开启appium-server即可,方便记录日志