在学习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)
页面显示的错误:
