情况1:
使用时:
C:Program Files (x86)Javajdk1.7.0bin>java -jar C:seleniumselenium-2.25.0selenium-server-standalone-2.25.0.jar -htmlSuite "*googlechrome" https://accounts.google.com/ "C:seleniumIdetest_suite.htm" "C:seleniumIderesults.htm"
获取异常:
HTML套件出现异常:java.lang.RuntimeException:java.lang.RuntimeException:在路径请添加包含"chrome.exe"或"google chrome"或"google chrome"添加到您的PATH环境avariable,或者显式指定一个到Google Chrome的路径,如下所示:*谷歌浏览器c:\blah\chrome.exe
情况2
如此更改
C: \Program Files(x86)\Java\jdk1.7.0\bin>Java-jar C:\selenium\selenium-2.25.0\seleniumserver-standalone-2.25.0.jar-htmlSuite"C:\Program Files(x86https://accounts.google.com/"C:\selenium\Ide\testronguite.htm"C:\seleselenium\Ide\results.htm">
获取:
看到HTML套件异常:java.lang.RuntimeException:不支持浏览器:C:\Program Files(x86)\Google\Chrome\Application\Chrome.exe(你忘了加*了吗?)
支持的浏览器包括:*萤火虫*模拟*firefoxproxy*pifirefox*铬*ieexploreproxy*iexplore*firefox3*狩猎*谷歌铬*konqueror*firefox2*狩猎*piiexplore*萤火虫铬*歌剧*网络驱动程序*iehta*自定义
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.browserNotSupported(BrowserLauncherFactory.java:151)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.getBrowserLauncher(BrowserLauncherFactory.java:127)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.getBrowserLauncher(HTMLLauncher.java:78)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:138)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:196)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:612)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:286)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:244)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)
23:23:19.194信息-正在关闭。。。
情况3
因此浏览器再次更改为*chrome
它应该在chrome上运行,但它在Firefox 上运行
使用*googlechrome在Chrome浏览器上运行。并将包含"chrome.exe"或"googlechrome"的目录添加到您的PATH环境中。注意-如果你只是说*chrome,它会调用Firefox chrome。
它还应该通过将"*googlechrome"参数更新为-"*googlechrome C:\Program Files(x86)\Google\Chrome\Application\Chrome.exe">