问题遇到的现象和发生背景
通过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 <module>
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
我的解答思路和尝试过的方法
我尝试过重新搭建环境,结果还是这样
我想要达到的结果
预期结果:无报错信息