问题描述
当我运行下面的程序来启动 python 程序来启动 android 应用程序时,我收到以下错误:
引发 MaxRetryError(_pool,url,error 或 ResponseError(cause))
urllib3.exceptions.MaxRetryError: httpconnectionPool(host='0.0.0.0',port=4723): Max retries exceeded with url: /wd/hub/session (由 NewConnectionError('
环境:Windows10,Appium v1.20.2
库列表:
Appium-Python-Client~=1.0.2
selenium~=3.141.0
pytest~=6.1.1
allure-pytest
pytest-parallel
pytest-xdist
pytest-rerunfailures
pytest-sugar
pytest-json
pyMysqL~=0.10.1
sshtunnel~=0.1.5
requests~=2.24.0
invoke~=1.4.1
python-dotenv
pytest-html-reporter~=0.2.3
from appium import webdriver
desired_caps= {}
desired_caps['platformName']='Android'
desired_caps['automationName']='UiAutomator2'
desired_caps['platformVersion']='9'
desired_caps['deviceName']='TKX44XS8DAVWNRMZ'
desired_caps['app']='path/Android-NativeDemoApp-0.2.1.apk'
desired_caps['appPackage']='com.wdiodemoapp'
desired_caps['appActivity']='com.wdiodemoapp.MainActivity'
driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub',desired_caps)
请帮忙。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)