您正在使用cmd提示符下面的命令启动集线器
java -jar selenium-server-standalone-2.53.0.jar -role hub
然后设置节点,我正在使用下面的行(IE)
java -Dwebdriver.ie.driver=C:\ccviews\Workspace2\CrossBrowserFramework\resources\IEDriverServer_Win32_2.43.0\IEDriverServer.exe -jar C:\ccviews\Workspace2\CrossBrowserFramework\resources\selenium-server-standalone-2.53.0.jar -role webdriver -hub http://localhost:4444/grid/register -browser browserName=ie,platform=WINDOWS
集线器和节点都在启动,但我无法使用eclipse selenium启动IE浏览器。我收到以下错误:
org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}]
使用
的java代码System.setProperty("webdriver.ie.driver", "C:\\ccviews\\CrossBrowserFramework\\resources\\IEDriverServer_Win32_2.43.0\\IEDriverServer.exe");
DesiredCapabilities p_ieCapabilities = DesiredCapabilities.internetExplorer();
try {
r_driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), p_ieCapabilities);
} catch (MalformedURLException e) {
e.printStackTrace();
}