我正在尝试使用driver.close()
代码关闭窗口,但它无效
如果我以driver.quit()
结束然后它正在关闭,但我正在接受红色测试。可能是异常或错误,但我不确定。
以下是我收到的消息
Sep 08, 2015 2:30:26 PM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder
INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@48cff89c
我的firefox版本是:40.0.3 selenium Jar是:“selenium-server-standalone-2.46.0”
答案 0 :(得分:1)
使用更新的罐子2.47.1现在可用(更新服务器+绑定两个罐子): -
http://docs.seleniumhq.org/download/
如果您在任何页面之间切换,那么您需要切换回同一页面以使用driver.close();
关闭该页面。