Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium 在运行robot脚本时,需要做些什么来延迟firefox浏览器中下一行的执行?_Selenium_Robotframework - Fatal编程技术网

Selenium 在运行robot脚本时,需要做些什么来延迟firefox浏览器中下一行的执行?

Selenium 在运行robot脚本时,需要做些什么来延迟firefox浏览器中下一行的执行?,selenium,robotframework,Selenium,Robotframework,我在robot框架中使用了“Sleep”关键字来暂停给定时间内执行的测试。在chrome和edge浏览器中会出现预期的时间延迟,但在Firefox中不会出现预期的时间延迟。相反,错误消息被抛出为ConnectionAbortedError:[WinError 10053]主机中的软件中止了已建立的连接 我的剧本如下: Wait Until Page Contains Element ${drop_down_button} Element Should Be Enabled ${drop_do

我在robot框架中使用了“Sleep”关键字来暂停给定时间内执行的测试。在chrome和edge浏览器中会出现预期的时间延迟,但在Firefox中不会出现预期的时间延迟。相反,错误消息被抛出为ConnectionAbortedError:[WinError 10053]主机中的软件中止了已建立的连接

我的剧本如下:

Wait Until Page Contains Element  ${drop_down_button}
Element Should Be Enabled  ${drop_down_button}
Click button  ${drop_down_button}
Element Should Be Visible  ${drop_down_item}
Click Element  ${drop_down_item}
Sleep  20s

在上面的代码中,单击下拉项后,执行的测试应该暂停给定的时间。要延迟firefox浏览器中下一行的执行,必须做些什么?如何处理此错误连接BortedError:[WinError 10053]主机中的软件中止了已建立的连接?为了克服这个错误,我尝试设置“设置Selenium隐式等待”、“设置Selenium超时”和“设置浏览器隐式等待”。但是什么都没用。

你能分享你的环境细节吗?即selenium库、Firefox和geckodriver的版本

有报道称,selenium 3.12.0和geckodriver 0.21.0中出现了该问题,并将其降级至geckodriver 0.20.1

硒3.14.0和geckodriver 0.21.0固定/不存在


我建议您将环境放在两个版本集中的一个中,如果还没有,最好是以后的版本。

一般来说,Selenium开发人员建议不要混合隐式和显式等待-将前者保留为0,否则可能会出现意外延迟。我在下面列出了版本详细信息:Selenium-3.12.0,ff-57.0,geckodriver-0.21.0我应该安装哪个版本的selenium和geckodriver来解决这个问题selenium-3.14.0,geckodriver-0.21.0;FF-最新的公开版本(我想是60左右)谢谢!它目前运行良好,我有selenium 3.12.0,并将geckodriver降级为0.20.1