使用Selenium Web驱动程序时如何在测试执行后保持浏览器打开 [英] How to keep the browser open after test execution when using selenium web driver

查看:321
本文介绍了使用Selenium Web驱动程序时如何在测试执行后保持浏览器打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的脚本在浏览器的不同选项卡中搜索不同的字符串.有没有办法在测试执行结束后保持浏览器打开,以便以后可以检查结果?目前,即使我没有使用driver.quit(),浏览器也会在5分钟后自动关闭.

My script searches for different strings in different tabs of a browser. Is there a way to keep the browser open after test execution is over so that results can be checked at a later time? Currently the browser closes automatically after 5 mins even though i am not using driver.quit().

硒:2.33,Win 7,FF和Chrome

Selenium: 2.33, Win 7, FF and Chrome

推荐答案

我至少能够解决我的问题.我正在使用Remote Web Driver类,并且有一个选项可以在启动集线器时在命令行上提供超时和browser_timeout参数.将该值设置为0意味着集线器将无限期等待.对于这种情况,我只想要那个.

I was able to get the fix at least for my problem. I am using Remote Web Driver class and there is an option to provide timeout and browser_timeout parameters on the command line when the hub is started. Setting the value to 0 means the hub will wait indefinitely. For this scenario i wanted that only.

这篇关于使用Selenium Web驱动程序时如何在测试执行后保持浏览器打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆