Selenium2Library;浏览器加载永远不会结束,并且不会发生超时

时间:2017-03-14 08:39:28

标签: robotframework selenium2library

要使用IE浏览器打开网址,它会打开IE浏览器,网页正确,网页加载时间很长[甚至加载永不结束]。 但是我希望在一段时间后,它会因超时而失败。

这是我的代码:

Set Selenium Timeout    ${set_timeout}              
Open Browser    ${sURL}     IE                  
Wait Until Page Contains Element    ${toVisibleElement} 20s 

但是在打开浏览器之后,它会长时间加载并且执行永远不会结束。

1 个答案:

答案 0 :(得分:0)

您需要设置一些IE浏览器设置,如下所示:

1. Open Internet Explorer browser--> Select Internet Options from Tools menu

2. Select Security Tab --> Select Enable Protected Mode option -- >
 Check the default Zone level for 'Internet'.
If you look at the screen shot below, security level for this zone is selected as
 'Allowed level for this zone : Medium to High.' and 'Enable Protected Mode' option is Checked

现在,您需要确保其他区域,例如“本地互联网”和“其他区域”。和“可信站点”#39;也被选为ABOVE。您可能不需要对“受限制的网站”做任何事情。选项。我们可以按原样保留选项,默认情况下启用保护模式'选项将被选中。

现在更改设置后,请点击'应用'并且' Ok'按钮。