查了一下网上的webdreiver 的 api,才发现,
quit()详细信息: “Quits this driver, closing every associated window”,执行这个方法后,driver会关闭所有关联窗口。
close()详细信息:Close the current window, quitting the browser if it's the last window currently open ,此方法是关闭当前窗口,或最后打开的窗口。
1. webDriver.Close() - Close the browser window that the driver has focus of //关闭当前焦点所在的窗口
2. webDriver.Quit() - Calls dispose //调用dispose方法
3. webDriver.Dispose() Closes all browser windows and safely ends the session 关闭所有窗口,并且安全关闭session