selenium webdrive中close与quit
上一篇 /
下一篇 2016-02-02 16:36:05 / 天气: 舒适
/ 心情: 平静
/ 个人分类:selenium
使用selenium webdrive也有一段时间了,关闭
浏览器一直使用的是driver.quit()方法,但是今天却想只关闭一个窗口的时候,郁闷了,为啥使用quit方法总是关闭我打开的两个浏览器窗口,突然间想到了还有
close方法呀,一尝试才知道。。。
下面把这两个方法总结下写下来吧,如下:
driver.quit():quit this dirver, closing every associated windows;
driver.close():close the current window, quiting the browser if it is the last window currently open.
收藏
举报
TAG:
close