通过python连接appium时
from appium import webdriver
desired_caps={
"platformName": "Android",
"platformVersion": "7.1.2",
"deviceName": "HUAWEI",
"appPackage": "com.qqeng.adult",
"appActivity": "com.qqeng.online.core.BaseActivity"
}
driver = webdriver.Remote("http://localhost:4723/wd/hub",desired_caps)
Traceback (most recent call last):
File "D:\web\bigzahui\adb_Shell\com.qqeng.online\QQenglish.py", line 10, in
driver = webdriver.Remote("http://localhost:4723/wd/hub",desired_caps)
File "D:\web\python\lib\site-packages\appium\webdriver\webdriver.py", line 268, in __init__
AppiumConnection(command_executor, keep_alive=keep_alive), desired_capabilities, browser_profile, proxy
File "D:\web\bigzahui\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 277, in __init__
self.start_session(capabilities, browser_profile)
File "D:\web\python\lib\site-packages\appium\webdriver\webdriver.py", line 361, in start_session
self.capabilities = response.get('value')
AttributeError: can't set attribute
我尝试过重新搭建环境,结果还是这样
预期结果:无报错信息
我的版本是3.7.6的,python的版本是没有问题的,,出问题的是
可能是python版本的问题,换个版本再试试