使用WebDriver进行的Selenium IDE测试失败

时间:2015-02-26 18:26:33

标签: internet-explorer selenium selenium-webdriver selenium-ide

我目前正在使用Selenium IDE进行测试。我需要在Firefox以外的其他浏览器上进行测试,所以我决定使用Internet Explorer。

我下载了selenium-server-standalone-2.44.0.jar文件和IEDriverServer_Win32_2.44.0.exe,并成功运行了Internet Explorer上的Selenium IDE测试。

然而,IE上的测试完全失败。 IE上的每个其他命令或测试都失败了。每次IE都无法在页面上找到元素的链接和ID。然而,我的IDE测试在Firefox上完美传递。

IDE是否有理由在Firefox上成功传递但在资源管理器中以如此悲惨的方式传递?

另外,我使用的是IE 8版本。

谢谢。

以下是显示所有错误的日志报告。如您所见,它无法在第五行找到该元素。但是同样的脚本在Firefox中运行良好。为什么它无法在IE中找到元素但在Firefox中找不到CAN?

[info] Playing test case 2.8 Manage Subjects (SBJ)
[info] Executing: |open | https://company's URL here | |
[info] Executing: |type | id=ctl00_MainPlaceHolder_txtUserName | username |
[info] Executing: |type | id=ctl00_MainPlaceHolder_txtPassword | password |
[info] Executing: |clickAndWait | id=ctl00_MainPlaceHolder_pbSubmit | |
[info] Executing: |clickAndWait | id=ctl00_MainPlaceHolder_AdminLinkButton | |
[error] Element id=ctl00_MainPlaceHolder_AdminLinkButton not found
[info] Executing: |clickAndWait | link=Pharma Architect | |
[error] Element link=Pharma Architect not found
[info] Executing: |clickAndWait | 

1 个答案:

答案 0 :(得分:0)

我没有在IDE上运行测试,但我的WebDriver测试在IE11版本(可能更新浏览器)上运行正常。我发现比我更新的东西我都有问题。

enter image description here