【发布时间】:2015-04-20 20:10:00
【问题描述】:
我正在尝试在 Selenium IDE 中运行记录的测试用例。问题是当我尝试执行整个测试用例时,Selenium 会阻止它在页面上找不到元素。问题是我可以执行测试用例的单个步骤。我认为 Selenium 会在加载新页面之前尝试查找元素,所以我使用了 clickAndWait、pause 和 waitForElementPresent 命令 - 没有任何效果,Selenium 停止了测试用例。
调试日志
• [info] Executing: |`clickAndWait` | css=i.fa.fa-arrow-left | |
• [debug] Command found, going to execute clickAndWait
• [debug] modifyWindow seleniumMarker1429084950752:selenium1429084951105
• [debug] _getFrameElement: frameElement=null
• [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1429084951105
• [debug] getCurrentWindow newPageLoaded = false
• [error] Element css=i.fa.fa-arrow-left not found
• [debug] commandError
• [debug] testComplete: failed=true
• [info] Test case failed
我将非常感谢任何帮助和建议。
【问题讨论】:
-
在此处需要更多信息。查看更多脚本会有所帮助。在 css=i.fa.fa-arrow-left 上执行 clickAndWait 之前会发生什么?您是否在 clickAndWait 之前检查过该元素是否存在。这似乎就是这里所暗示的。
-
本次测试是否涉及多个窗口?
标签: selenium-ide