首页 > 技术文章 > selenium退出语句区别

i16i1007 2017-03-26 10:49 原文

selenium关闭窗口有两个方法,close与quit,我们稍作研究便知道这两个方法的区别。

1.看源码或API

这是close()的说明:

Closes the current window.
关闭当前窗口

这是quit()的说明:

Quits the driver and closes every associated window.
退出驱动并关闭所有关联的窗口

推荐阅读