Internet explorer 未找到Selenium RC-元素链接(仅在Internet Explorer中)
我目前正经历一场噩梦,让IE8、9和10正确地使用Selenium RC实现自动化。问题是它似乎找不到任何link=whater类型的东西。我在testrunner中得到一个错误“Element link=Live Dead Assay not found”。它在线路上出现故障:Internet explorer 未找到Selenium RC-元素链接(仅在Internet Explorer中),internet-explorer,automated-tests,element,selenium-rc,Internet Explorer,Automated Tests,Element,Selenium Rc,我目前正经历一场噩梦,让IE8、9和10正确地使用Selenium RC实现自动化。问题是它似乎找不到任何link=whater类型的东西。我在testrunner中得到一个错误“Element link=Live Dead Assay not found”。它在线路上出现故障: try { if (selenium.isElementPresent("link=Live Dead Assay")) 问题是,我们测试的所有其他浏览器(Firefox、Chrome和Safari)都可以顺利工作。
try { if (selenium.isElementPresent("link=Live Dead Assay"))
问题是,我们测试的所有其他浏览器(Firefox、Chrome和Safari)都可以顺利工作。我只关心这个问题
下面是我们使用的脚本(这是通过从Selenium IDE导出创建的)
为了让大家都知道,我尝试在selenium.isElementPresent行前面暂停,但这不起作用。我也试着把测试跑步者的速度降到最慢,同样没有成功
任何帮助都将不胜感激。多谢各位
克里斯
2013年1月30日 我应该补充一点,我们也通过Jenkins运行html脚本,这在同一点上也失败了。我们已经为此设置了*iexplore 然而,就在今天,在同事的本地机器上,我们从命令行运行了htmlsuite Selenium独立服务器。在本例中,我们使用了*piiexplore,测试实际上找到了其他设置失败的元素。从那以后,我尝试了*piiexplore与我们的Jenkins工作,但这不起作用,并在同一点上失败了。
这可能是本地机器设置吗?或者通过Jenkins运行测试的问题?可以通过使用xpath而不是link=blah来解决。IE喜欢这个:-)
@Test
public void clickLink() throws Exception {
// Open nav and expand Screens
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("css=#browse_screens_folder_52 > ins.jstree-icon")) break; } catch (Exception e) {}
Thread.sleep(1000);
}
selenium.click("css=#browse_screens_folder_52 > ins.jstree-icon");
// Open small image (Live Dead Assay)
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("css=#browse_screen_568 > ins.jstree-icon")) break; } catch (Exception e) {}
Thread.sleep(1000);
}
selenium.click("css=#browse_screen_568 > ins.jstree-icon");
// 35669 Check info table present
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("link=Live Dead Assay")) break; } catch (Exception e) {}
Thread.sleep(1000);
}
selenium.click("link=Live Dead Assay");
}