当我尝试使用 appium 从 robotframework 启动应用程序时
我得到以下错误
ValueError: Timeout value connect was <object object at 0x106cc5b50>, but it must be an int, float or None.
这永远不会发生。我不知道为什么,我所做的只是尝试从 robotframework appium 库中使用一个简单的 open app 关键字
点列表
Package Version
------------------------------ --------
Appium-Python-Client 1.3.0
astor 0.8.1
async-generator 1.10
attrs 23.1.0
beautifulsoup4 4.9.1
certifi 2023.5.7
chardet 3.0.4
charset-normalizer 2.0.12
decorator 5.1.1
docutils 0.18.1
exceptiongroup 1.1.1
h11 0.14.0
idna 2.10
kitchen 1.2.6
lxml 4.5.2
outcome 1.2.0
pip 22.0.4
PySocks 1.7.1
PyYAML 6.0
requests 2.30.0
robotframework 5.0
robotframework-appiumlibrary 1.6.3
robotframework-pabot 2.5.4
robotframework-pythonlibcore 4.1.2
robotframework-requests 0.9.2
robotframework-seleniumlibrary 6.1.0
robotframework-stacktrace 0.4.1
selenium 3.141.0
setuptools 60.10.0
six 1.16.0
sniffio 1.3.0
sortedcontainers 2.4.0
soupsieve 2.0.1
strutil 0.2.1
tk 0.1.0
trio 0.22.0
trio-websocket 0.10.2
urllib3 2.0.2
wheel 0.37.1
wsproto 1.2.0
Pip3 列表
Package Version
------------------------------ --------
Appium-Python-Client 1.3.0
astor 0.8.1
async-generator 1.10
attrs 23.1.0
beautifulsoup4 4.9.1
certifi 2023.5.7
chardet 3.0.4
charset-normalizer 2.0.12
decorator 5.1.1
docutils 0.18.1
exceptiongroup 1.1.1
h11 0.14.0
idna 2.10
kitchen 1.2.6
lxml 4.5.2
outcome 1.2.0
pip 22.0.4
PySocks 1.7.1
PyYAML 6.0
requests 2.30.0
robotframework 5.0
robotframework-appiumlibrary 1.6.3
robotframework-pabot 2.5.4
robotframework-pythonlibcore 4.1.2
robotframework-requests 0.9.2
robotframework-seleniumlibrary 6.1.0
robotframework-stacktrace 0.4.1
selenium 3.141.0
setuptools 60.10.0
six 1.16.0
sniffio 1.3.0
sortedcontainers 2.4.0
soupsieve 2.0.1
strutil 0.2.1
tk 0.1.0
trio 0.22.0
trio-websocket 0.10.2
urllib3 2.0.2
wheel 0.37.1
wsproto 1.2.0
我的python版本
Python 3.9.12
我查看日志时Appium没有运行,这可能是问题所在?
我的示例应用程序
*** Settings ***
# Default Library
Library AppiumLibrary
Library BuiltIn
*** Variables ***
${path} /Users/jj/Downloads/sample.apk
*** Test Cases ***
Install the app
Open Application http://localhost:4723/wd/hub alias=Myapp1 platformName=iOS platformVersion=7.0 deviceName='iPhone Simulator' app=${path}
我在类似的情况下在 Azure DevOps 管道中运行一些测试。这种情况是由 urllib3 依赖引起的,当我将库降级到低于 2.0.0 的版本时,打开应用程序在我的管道中正常运行
显然 urllib3 2.0.0 的默认超时发生了重大变化,导致了这个错误。
我通过在我的 mac 上降级我的 selenium 版本来解决它
不知道为什么会这样,好像有bug
我的工作版本
Package Version
---------------------------- --------
Appium-Python-Client 2.9.0
astor 0.8.1
async-generator 1.10
attrs 23.1.0
beautifulsoup4 4.9.1
certifi 2023.5.7
cffi 1.15.1
chardet 3.0.4
charset-normalizer 2.0.12
cryptography 40.0.2
decorator 5.1.1
docutils 0.18.1
exceptiongroup 1.1.1
h11 0.14.0
idna 2.10
kitchen 1.2.6
lxml 4.5.2
outcome 1.2.0
pip 22.0.4
pycparser 2.21
pyOpenSSL 23.1.1
PySocks 1.7.1
PyYAML 6.0
requests 2.30.0
robotframework 6.0.2
robotframework-appiumlibrary 1.6
selenium 4.1.2
setuptools 60.10.0
six 1.16.0
sniffio 1.3.0
sortedcontainers 2.4.0
soupsieve 2.0.1
strutil 0.2.1
tk 0.1.0
trio 0.22.0
trio-websocket 0.10.2
urllib3 1.26.15
urllib3-secure-extra 0.1.0
wheel 0.37.1
wsproto 1.2.0