selenium.open() 在迭代测试中变得无响应

发布于 2024-09-24 15:22:01 字数 404 浏览 1 评论 0原文

我有一组必须使用不同参数执行的测试步骤。我已在 Eclipse/TestNG 中编写了此脚本,由 Excel 工作表提供的参数驱动。 现在,测试步骤包括设置页面的属性,然后打开另一个页面以确认该属性已设置。因此,实际上,我在测试开始时使用一个简单的 selenium.open("my_first_url");,设置属性,然后使用另一个 selenium.open("my_second_url") ; 打开执行断言的另一个 url。 大约有9-10组测试数据。

问题是这样的—— 当测试迭代到第四次迭代时,selenium RC 只是在 selenium.open(...); 命令处暂停(挂起?)。 我以前注意到过这种情况,但只是将其视为测试异常。

任何指示将不胜感激。谢谢。

I have a set of test steps that I have to execute with different parameters. I have scripted this in Eclipse/TestNG, driven by the parameters supplied via an excel sheet.
Now, the test steps involve setting the property of a page, and then opening another page to confirm that the property is set. So, in effect, I use a simple selenium.open("my_first_url"); at the beginning of the test, set the property, and then another selenium.open("my_second_url"); to open the other url where the assertion is performed.
There are about 9-10 sets of test data.

Here's the problem-
By the time the test iterates through the 4th iteration, selenium RC simply pauses (hangs?) at the selenium.open(...); command.
I have noticed this happening before, but simply thought of it as a test anomaly.

Any pointers would be appreciated. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

野心澎湃 2024-10-01 15:22:01

selenium.open() 方法上方添加以下行

selenium.setTimeout("0");

Add below line above selenium.open() method

selenium.setTimeout("0");
可爱咩 2024-10-01 15:22:01

我仍然不确定FF中出现这种情况的原因。为了解决这个问题,我升级到了 selenium server 2.0 的 alpha 版本。

I'm still not sure of what causes this in FF. To work around, I upgraded to the alpha release of the selenium server 2.0.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文