Selenium 通过Java代码从linux自动化windows页面

Selenium 通过Java代码从linux自动化windows页面,selenium,Selenium,我是硒的新手。我必须使用java代码从linux机器上自动运行windows机器上的页面。根据建议,我正在使用selenium网格。我在单独的windows计算机上注册了hub和node(用于测试)。要在node上打开网页,我使用以下代码: DesiredCapabilities capability = DesiredCapabilities.firefox(); driver = new RemoteWebDriver(new URL("http://ipaddress_hub:4444/w

我是硒的新手。我必须使用java代码从linux机器上自动运行windows机器上的页面。根据建议,我正在使用selenium网格。我在单独的windows计算机上注册了hub和node(用于测试)。要在node上打开网页,我使用以下代码:

DesiredCapabilities capability = DesiredCapabilities.firefox();
driver = new RemoteWebDriver(new URL("http://ipaddress_hub:4444/wd/hub"),capability);
baseUrl = "https://www.google.co.in/";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
但我也有错误

Error forwarding the new session new session request for webdriver should contain a location header with the session.
我是否需要定义浏览器和版本的功能?
任何帮助都将不胜感激。

您能详细说明plz吗?我能用这个例子吗?