我有一组使用https://github.com/camme/webdriverjs编写的验收测试。我希望通过Selenium Server(WebDriver)和Sauce Labs对真正的浏览器运行测试。 Firefox启动正常,但Chromium(Debian Wheezy包中的30.0.1599.101)不支持。通过只设置{ desiredCapabilities: { browserName: "chrome" } }
我得到ERROR COULDNT GET A SESSION ID
和硒Server控制台输出显示Selenium服务器无法启动Chromium
WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list
如果我启动Selenium服务器与出现-Dwebdriver.chrome.driver=/usr/bin/chromium
新的浏览器窗口,但测试不会开始运行,超时后我得到同样的ERROR COULDNT GET A SESSION ID
和硒Server控制台输出显示
Created new window in existing browser session. 13:43:25.775 WARN - Exception thrown java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
[...]
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
[...]
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
[...]
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
显然,我需要安装Chrome的驱动程序和点'webdriver.chrome.driver'给司机,而不是浏览器的二进制文件。 –
现在,通过Chrome驱动程序,我可以更进一步。 Chromium开始但是测试在开始时失败,出现'未知命令'WaitForAllTabsToStopLoading''作为响应。 –