加上 desired_caps['noReset'] = 'True'
1 from appium import webdriver
2 from time import sleep
3 from appium.webdriver.common.touch_action import TouchAction
4 desired_caps = {}
5 desired_caps['platformName'] = 'Android'
6 desired_caps['platformVersion'] = '9.0'
7 desired_caps['deviceName'] = 'xxxxx'
8 desired_caps['appPackage'] = 'com.xxxx'
9 desired_caps['appActivity'] = '.MainActivity'
10 desired_caps['noReset'] = 'True'
11
12 driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)
13 sleep(5)
你说的有道理
开源的吗?