问题
appium 连接模拟器报错
from appium import webdriver
caps = {}
caps[‘platformName’] = ‘android’
caps[‘platformVersion’] = ‘9’
caps[‘deviceName’] = ‘emulator-5554’
caps[‘appPackage’] = ‘com.gsb.xtongda’
caps[‘appActivity’] = ‘.activity.MainTabActivity’
print(caps)
driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub’, caps)
报错信息
D:\Python38\python.exe D:/demoapp/demo01.py
{‘platformName’: ‘android’, ‘platformVersion’: ‘9’, ‘deviceName’: ‘emulator-5554’, ‘appPackage’: ‘com.gsb.xtongda’, ‘appActivity’: ‘.activity.MainTabActivity’}
Traceback (most recent call last):
File “D:/demoapp/demo01.py”, line 10, in
driver = webdriver.Remote(‘http://127.0.0.1:4723/wd/hub’, caps)
File “D:\Python38\lib\site-packages\appium\webdriver\webdriver.py”, line 229, in init
super().init(
File “D:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 192, in init
capabilities = options.to_capabilities()
AttributeError: ‘NoneType’ object has no attribute ‘to_capabilities’
环境
win10