【发布时间】:2015-04-29 06:35:21
【问题描述】:
我目前正在使用 Selenium IDE 进行测试。我需要在 Firefox 以外的其他浏览器上进行测试,所以我决定使用 Internet Explorer。
我下载了 selenium-server-standalone-2.44.0.jar 文件和 IEDriverServer_Win32_2.44.0.exe 并成功地在 Internet Explorer 上运行我的 Selenium IDE 测试。
但是,IE 上的测试完全失败。 IDE 上的所有其他命令或测试在 IE 中均失败。每次 IE 都找不到页面上元素的链接和 id。然而,我的 IDE 测试在 Firefox 上完美通过。
IDE tets 会在 Firefox 上成功通过,但在 Explorer 中却以如此悲惨的方式通过有什么原因?
另外,我使用的是 IE 版本 8。
谢谢。
这是显示所有错误的日志报告。如您所见,它找不到第五行的元素。但相同的脚本在 Firefox 中运行良好。为什么在 IE 中找不到元素,在 Firefox 中却可以?
[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 |
【问题讨论】:
-
请提供错误示例。
-
肯定有一些命令在 webdriver 中失败,但在 IDE 中运行良好。这可能不是特定于 IE 的。
-
但这不是最基本的命令吗... clickAndWait ?
-
是的,我不是很肯定我的意思是什么......但有可能 IE 中的 html DOM 与 firefox 不同。
标签: internet-explorer selenium selenium-webdriver selenium-ide