如果我没记错的话"*chrome
" 用于启动 Firefox 的特殊模式 (您的应用程序拥有更多权限的模式——安全限制更少);因此,启动的是 Firefox,而不是 Google Chrome,这是正常的。
如果您想启动 Google Chrome,则必须使用“*chrome
".
在交互模式下使用 Selenium RC,如下所示:
$ java -jar selenium-server.jar -interactive
并使用getNewBrowserSession
命令不正确:
cmd=getNewBrowserSession
我得到支持的浏览器列表:
23:43:09.317 INFO - Got result: Failed to start new browser session: Browser not supported:
(Did you forget to add a *?)
Supported browsers include:
*firefox
*mock
*firefoxproxy
*pifirefox
*chrome
*iexploreproxy
*iexplore
*firefox3
*safariproxy
*googlechrome
*konqueror
*firefox2
*safari
*piiexplore
*firefoxchrome
*opera
*iehta
*custom
on session null
所以,我猜您应该能够使用“启动 Google Chrome”*googlechrome
"代替 ”*chrome
".
我不在 Windows 上,所以我无法自己尝试...而且我在文档中找不到任何支持我的内容...不过,运气好的话,这可能会对您有所帮助...
无论如何,玩得开心!
旁注:实际上,谷歌浏览器并不是发明“chrome”一词的人;它的意思是很多东西 http://en.wikipedia.org/wiki/Chrome, like Chrome 浏览器 http://en.wikipedia.org/wiki/Chrome_Mozilla or 用户界面 Chrome http://en.wikipedia.org/wiki/User_interface_chrome