selenium测试问题

dai_zi 2017-05-17 08:30:32
在学习selenium1案例时 OPen本址文件时报异常,查询在网上一直没找到原因:
java代码
DefaultSelenium selenium=new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.baidu.com/index.php?tn=monline_3_dg");
selenium.start();
selenium.open("C:\\Users\\daixiaofei\\Desktop\\test.html");

报出来的异常:
Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at
https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Component returned failure
code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIDOMLocation.href]
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:109)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:103)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:369)
at Class1.main(Class1.java:11)


页面显示的错误:
...全文
124 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

51,411

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧