Java webdriver 3 beta2无法关闭窗口

Java webdriver 3 beta2无法关闭窗口,java,selenium-webdriver,geckodriver,Java,Selenium Webdriver,Geckodriver,我希望更新到selenium webdriver 3 beta 2以测试兼容性。 Selenium WebDriver:3.0.0-beta2 Firefox:48.0 操作系统:Windows 7 代码: 但浏览器不会关闭。 如果我使用browser.quit(),它将关闭,但抛出错误: 1472391805470木偶信息监听端口56555 1472391808818木偶信息startBrowser 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391808

我希望更新到selenium webdriver 3 beta 2以测试兼容性。
Selenium WebDriver:3.0.0-beta2
Firefox:48.0
操作系统:Windows 7
代码:


但浏览器不会关闭。
如果我使用
browser.quit()
,它将关闭,但抛出错误:

1472391805470木偶信息监听端口56555 1472391808818木偶信息startBrowser 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391808831木偶信息发送异步 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391809520木偶信息发送异步 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391809653木偶信息发送异步 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391827467木偶信息发送异步 95d29b68-b0bb-487a-915c-4896cfaa09ee 1472391827483木偶信息发送异步 95d29b68-b0bb-487a-915c-4896cfaa09ee[儿童6088]####!!!中止: 正在中止通道错误。错误:文件 c:/builds/moz2_slave/m-rel-w64-00000000000000/build/src/ipc/glue/MessageChannel.cpp, 线程“main”中的第2046行异常 org.openqa.selenium.remote.UnreachableBrowserException:错误 与远程浏览器通信。它可能已经死了。构建信息: 版本:“未知”,版本:“31c43c8”,时间:“2016-08-02 21:57:56” -0700'系统信息:主机:'mrunal laptop',ip:'192.168.56.1',os.name:'Windows 7',os.arch:'amd64',os.version:'6.1', java.version:'1.8.0_45'驱动程序信息:Driver.version:RemoteWebDriver 能力[{rotatable=false,RaiseAccessibilityExceptions=false, 木偶网=true,appBuildId=20160726073904,版本=,平台=XP, proxy={},command_id=1,specificationLevel=0, firefox_binary=“firefoxbinarypath”, acceptSslCerts=false,browserVersion=48.0,platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384},浏览器名=Firefox, takesScreenshot=true,takesElementScreenshot=true, platformName=Windows\u NT,设备=desktop}]会话ID: 95d29b68-b0bb-487a-915c-4896cfaa09ee地址 org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:670) 在 org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:706) 在 org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:531) 在practice.GeckDriverTest.main(GeckDriverTest.java:20)中,由以下原因引起: java.lang.IllegalStateException:UnixUtils不能在Windows上使用 在 org.openqa.selenium.os.ProcessUtils.getProcessId(ProcessUtils.java:188) 在 org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.getPID(UnixProcess.java:222) 在 org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$300(UnixProcess.java:201) 位于org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:132) 位于org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155) 在 org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:196) 在 org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:94) 在 org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:649) ... 3个以上


尝试创建一个新的
DesiredCapabilities
实例

 DesiredCapabilities capabilities = DesiredCapabilities.firefox();
而不是

 cap.setCapability("marionette", true);
 cap.setCapability("firefox_binary", "firefoxbinarypath");

尝试创建一个新的
DesiredCapabilities
实例

 DesiredCapabilities capabilities = DesiredCapabilities.firefox();
而不是

 cap.setCapability("marionette", true);
 cap.setCapability("firefox_binary", "firefoxbinarypath");

这已经存在了。如果我们将其命名为cap或capabilities,则没有区别。如果我们将其命名为cap或capabilities,则没有区别