测试基础 RobotFramwork+appium + 微信小程序,页面元素未找到,用例未及时退出 (10min 之后),观察发现卡在 Capture Page Screenshot,求助分析原因

chma · 2019年09月27日 · 最后由 Andrew Lu 回复于 2022年02月07日 · 1664 次阅读

python 环境:

C:\Users\Administrator>python --version
Python 3.7.2

rotbot 环境:

robotframework 3.1.2
robotframework-appiumlibrary 1.5.0.4
robotframework-databaselibrary 1.2.4
robotframework-extendedselenium2library 0.9.2
robotframework-ride 1.7.3.1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 3.3.1
robotframeworklexer 1.1
selenium 3.141.0

问题日志:

20190927 18:12:02.433 : WARN : Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /wd/hub/session/5cd190fc-9b7c-4697-97ce-94c393743af0/screenshot
20190927 18:18:02.460 : FAIL :
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT

20190927 18:18:02.465 : WARN :
Keyword 'Capture Page Screenshot' could not be run on failure: WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT

20190927 18:18:02.467 : FAIL : Element 'xpath=//label[text()='证件号码']/../../div/input' did not appear in 10 seconds
Ending test: AutoUi.2-Client.Client.冒烟测试

20190927 18:18:02.475 : INFO : 关闭浏览器
20190927 18:20:02.486 : WARN : Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /wd/hub/session/5cd190fc-9b7c-4697-97ce-94c393743af0
20190927 18:20:02.519 : FAIL :
WebDriverException: Message: A session is either terminated or not started

20190927 18:20:02.522 : WARN :
Keyword 'Capture Page Screenshot' could not be run on failure: WebDriverException: Message: A session is either terminated or not started

20190927 18:20:02.524 : FAIL :
WebDriverException: Message: A session is either terminated or not started

定位发现是失败截图引起的问题

修改 appiumlibrary 中失败注册正常退出

确认是失败截图造成的,但是不知道怎么解决,还需分析。。。。。求助大佬,需要保留失败截图的功能

已确定测试截图关键字在用例中功能正常

共收到 1 条回复 时间 点赞

我也碰到相同问题

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册