运行 测试用例通过 selenium 使用批处理文件时出错 IDE
Error in running test case using batch file via selenium IDE
我使用 Selenium IDE firefox 插件来记录测试用例,然后我使用“.bat”命令行使用以下命令自动测试,
java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -htmlSuite "*firefox" "http://16.52.110.123:8080/AntExample/userRegistration.htm" "C:\Selenium\First_Test_Real_Suite.html" "C:\selenium\logs\Result.html"
测试使用 .bat 脚本完美运行,但今天我 运行 脚本
突然在 firefox 中遇到此错误消息
Firefox can't find the file at
chrome://src/content/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http://16.52.110.123:8080/AntExample/userRegistration.htm&resultsUrl=http://localhost:4444/selenium-server/postResults&test=http://localhost:4444/selenium-server/tests/First_Test_Real_Suite.html.
我很乐意解决这个问题
由于最新的 Firefox 浏览器更新,您遇到了这个问题:)
First Download and Install Previous Firefox Browser Version 42.0 (Link
: Click here)
并尝试使用 Bat 文件执行相同的 Selenium 测试用例。它会正常工作。 :)
同样在安装火狐浏览器后,别忘了设置以下选项
Goto Tools >> Options >> Advanced Tab >> Update Tab >> select "Never
check for updates (not recommended: security risk)" option to disable
auto update.
运行 使用 bat 文件的 Selenium 测试用例将在新 "Selenium Standalone Server" 版本发布后正常工作(当前版本为 2.48.2 将适用于 Firefox 42.0)
upgrade/downgrade 到 FF 42.0 修复了错误。谢谢大家
这确实是因为 Firefox 43 不允许您 运行 未签名的附加组件。如果您坚持使用旧的 Selenium RC Runner 并希望 运行 最新的 Firefox,您可以通过允许未签名的附加组件再次启用附加组件:
- 在 Firefox 中转到 about:config
- 查找设置 xpinstall.signatures.required 并将其切换为 false
现在 任何 未签名的附加组件都将 运行,包括 Selenium RC Runner。使用它需要您自担风险 ;-)
我使用 Selenium IDE firefox 插件来记录测试用例,然后我使用“.bat”命令行使用以下命令自动测试,
java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -htmlSuite "*firefox" "http://16.52.110.123:8080/AntExample/userRegistration.htm" "C:\Selenium\First_Test_Real_Suite.html" "C:\selenium\logs\Result.html"
测试使用 .bat 脚本完美运行,但今天我 运行 脚本
突然在 firefox 中遇到此错误消息Firefox can't find the file at chrome://src/content/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http://16.52.110.123:8080/AntExample/userRegistration.htm&resultsUrl=http://localhost:4444/selenium-server/postResults&test=http://localhost:4444/selenium-server/tests/First_Test_Real_Suite.html.
我很乐意解决这个问题
由于最新的 Firefox 浏览器更新,您遇到了这个问题:)
First Download and Install Previous Firefox Browser Version 42.0 (Link : Click here)
并尝试使用 Bat 文件执行相同的 Selenium 测试用例。它会正常工作。 :)
同样在安装火狐浏览器后,别忘了设置以下选项
Goto Tools >> Options >> Advanced Tab >> Update Tab >> select "Never check for updates (not recommended: security risk)" option to disable auto update.
运行 使用 bat 文件的 Selenium 测试用例将在新 "Selenium Standalone Server" 版本发布后正常工作(当前版本为 2.48.2 将适用于 Firefox 42.0)
upgrade/downgrade 到 FF 42.0 修复了错误。谢谢大家
这确实是因为 Firefox 43 不允许您 运行 未签名的附加组件。如果您坚持使用旧的 Selenium RC Runner 并希望 运行 最新的 Firefox,您可以通过允许未签名的附加组件再次启用附加组件:
- 在 Firefox 中转到 about:config
- 查找设置 xpinstall.signatures.required 并将其切换为 false
现在 任何 未签名的附加组件都将 运行,包括 Selenium RC Runner。使用它需要您自担风险 ;-)