selenium关闭窗口有两个方法,close与quit,我们稍作研究便知道这两个方法的区别。 看源码或API close 这是close()的说明: Closes the current window. 关闭当前窗口。 quit 这是quit()的说明: Quits the driver and closes every associated window. 退出驱动并关闭所有关联的窗口。 从这里就很明显的看出来这两个方法的区别: 一个关闭当前窗口一个关闭所有窗口