selenium之 关闭窗口close与quit
来源:互联网 发布:淘宝 男装 原单 编辑:程序博客网 时间:2024/05/22 01:18
selenium关闭窗口有两个方法,close与quit,我们稍作研究便知道这两个方法的区别。
1.看源码或API
这是close()的说明:
Closes the current window.
关闭当前窗口。
这是quit()的说明:
Quits the driver and closes every associated window.
退出驱动并关闭所有关联的窗口。
从这里就很明显的看出来这两个方法的区别,一个关闭当前窗口,一个关闭所有窗口,下面写一小段代码测试一下。
2.代码试验
代码:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
结果:
- 1
- 2
- 3
- 1
- 2
- 3
- 顶
- 1
- 踩
0 0
- selenium之 关闭窗口close与quit
- selenium之 关闭窗口close与quit
- Selenium里WebDriver中窗口的close()与quit()
- selenium webdrive中close与quit
- [乐意黎原创] Selenium里WebDriver中窗口的close()与quit()
- selenium 使用close和quit关闭driver的不同点
- QT中关闭应用程序和窗口的函数(quit(),exit()以及close()的区别)
- window.close()关闭窗口
- selenium webdriver 你所不知道的quit 和close
- Selenium - Differences between WebDriver.close(), WebDriver.dispose() and WebDriver.quit()
- selenium中的quit和close方法的区别
- selenium webdriver 你所不知道的quit 和close
- WebDriver中close()与quit()的不同
- Qt学习经验之quit()、exit()、close()
- quit 和close 区别
- js自定义关闭窗口window.close
- fancybox关闭弹出窗口parent.$.fancybox.close();
- 关闭窗口,解决window.close()失效
- 树状数组详解
- Android中WebView的使用
- 分页
- STL--stack
- ueditor编辑器与springmvc整合使用
- selenium之 关闭窗口close与quit
- php实现页面静态化(纯静态&&伪静态)
- Java查找算法
- 从追MM谈Java的23种设计模式
- JQuery实现置顶、置底、向上、向下、取消排序功能
- Android 面试精华题目总结
- 字节对齐
- Spring注解
- MongoDB——第二天 细说增删查改