【发布时间】:2020-02-22 14:28:30
【问题描述】:
我想用 Java 编写一个 Selenium Grid 应用程序。
http://localhost:4444/grid/console 表示节点已连接到集线器。
在客户端,我想写以下内容:
try {
DesiredCapabilities capability = DesiredCapabilities.firefox();
WebDriver driver = new RemoteWebDriver(new URL("http://IP of Hub:4444/wd/hub"), capability);
capability.setBrowserName("firefox");
driver.get("https://www.google.com");
} catch (MalformedURLException ex) {
System.err.println("URL Exception: "+ex.getMessage());
}
很遗憾,运行客户端应用时抛出了以下异常:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: invalid argument: can't kill an exited process
...
Driver info: driver.version: unknown
【问题讨论】:
标签: java selenium selenium-grid