1.环境:
appium:1.6.5
jdk:1.7
appium-uiautomator2-driver:0.4
win10
python3.5

python 代码:

def setUp(self):
        desired_caps={}
        desired_caps['automationName'] = 'Uiautomator2'
        desired_caps['platformName']='Android'
        desired_caps['platformVersion']='6.0'
        desired_caps['deviceName']='debbea7b'
        desired_caps['appPackage']='com.test'
        desired_caps['appActivity']='spalsh.SpalshActivity'
        #关掉系统的输入法
        desired_caps['unicodeKeyboard']=True
        desired_caps['resetKeyboard']=True

        self.driver=webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)

appium 启动命令:
appium --address 127.0.0.1 --no-reset

运行代码时报错:


↙↙↙阅读原文可查看相关链接,并与作者交流