selenium rc 无法点击链接
我今天面临一个有点奇怪的问题。 Selenium 似乎单击了一个测试用例中的链接,但是在后续用例中忽略了相同的链接。测试用例的任何排列组合都会发生这种情况。无论第2次运行哪种情况,都会因上述问题而失败。任何人都可以建议一个解决方案吗?我尝试过 selenium.click 和 selenium.clickat。即使第一次使用 mouseup+mousedown 组合也不起作用。 selenium.fireevent 似乎也没有任何区别。
确实卡在这上面了。有人可以帮忙吗???
谢谢和问候,
瓦米普
I'm facing a kinda weird problem today. Selenium appears to click on a link in one test case, but, ignores the same link in the subsequent case. This happens with any permutation-combination of test cases. Whichever case run 2nd, fail due to the above problem. can anyone suggest a solution for this?? I've tried selenium.click and selenium.clickat. combination of mouseup+mousedown doesn't work even at the first go. selenium.fireevent also doesn't seem to make any difference.
Really stuck at this. Can anyone please help????
Thanks and Regards,
Vamyip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该链接会打开新窗口吗?如果是这样,我会尝试 selectWindow("myMainWindow") 命令以确保正确的页面具有焦点。
Does the link open a new window? If so, I would try the selectWindow("myMainWindow") command to be sure the proper page has the focus.
原因可能是
a)在执行案例建议之前该元素尚未显示在页面中
- 等待该元素waitFor(“link = mylink”)然后调用selenium.click(“link = mylink”)
b)那里可能是拼写错误或定位器未正确给出
Causes may be
a) the element has not shown in the page before that you had executed the case
sugg- wait for that element waitFor("link=mylink") and then call selenium.click("link=mylink")
b)there may be spelling error or locator not given properly