采用Selenium2 作为Web前段测试工具,跑测试脚本的时候遇到的问题是这样的:
比如进行10遍browser测试,在每次测试完成后,driver.quit(),关闭浏览器再重新开启后,对于IE,Cache会继续存在。所以对于需要Cache的测试,这样的Situation是满足的。
然而换成了Firefox后,FirefoxDriver目前采取的策略默认是新建profile。
即使将其设置为customer profile
FirefoxProfile profile = new ProfilesIni().getProfile("MySelenium");
DesiredCapabilities cap = DesiredCapabilities.firefox();
cap.setCapability(FirefoxDriver.PROFILE, profile);
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), cap);
FirefoxDriver也是依旧拷贝一份,这样可以使用该profile的cookie等,但却依然无法使用Cache。这就对测试造成了困扰,暂时不知如何解决。
还有一个问题就是对于run多次的脚本(脚本包含多个Transaction),如果在前几次运行,如出现Web Element的问题,我希望在后几次的脚本运行时可注释掉这些有问题的transaction(可将这些行为记入log),不知如何实现。或者也可采用其他方式。十分大家能够不吝赐教。
分享到:
相关推荐
本书是一本从入门到精通模式的Selenium WebDriver实战经验分享书籍。全书共分为四个部分:第1部分基础篇主要讲解自动化测试相关的基础理论、WebDriver 环境安装、单元测试工具的使用方法以及 WebDrvier的入门使用...
selenium webdriver是web自动化的一本经典著作,吴老集合python java不同版本。本资源为java版本,内容较新,无论是入门还是提升都有很大帮助。
关于Selenium WebDriver工作原理的介绍,原理相关描述
selenium RC与selenium webdriver的区别
Selenium WebDriver 3 Practical Guide will walk you through the various APIs of Selenium WebDriver, which are used in automation tests, followed by a discussion of the various WebDriver implementations...
Selenium WebDriver 3.14.0 本来需要.net45 我改为.net2.0 希望喜欢的人需要。 dll 反编译,嵌入程序内。无需调用那个讨厌的dll。 绝对不骗人,骗人是小狗。架构复杂修改麻烦,各位体谅
seleniumwebdriver(python) (第三版)
Selenium WebDriver Practical Guide will guide you through the various APIs of WebDriver which should be used in automation tests, followed by a discussion of the various WebDriver implementations ...
selenium webdriver基于python源码案例,全是案例适合小白入门学习
selenium2.0自动化
Selenium WebDriver Recipes in C#(2nd) 英文epub 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Selenium WebDriver 学习笔记 API大全 中文API 元素 操作大全
自动化测试:Selenium webdriver学习笔记C#版
Selenium Webdriver自动化测试 operadriver win64位,最新版本(20150611)
对于Selenium更加详细的操作和使用,推荐一本书《selenium webdriver(python)第三版》,该书详细的讲解了webdriver的用法
selenium WebDriver 安装包及启动服务的一些命令 对于正在学习自动化测试的小伙伴们非常有用
悠悠的selenium webdriver基于python源码案例,全是案例适合小白入门学习,现在有的资源都是只有4章
Solve your Selenium WebDriver problems with this quick guide to automated testing of web applications with Selenium WebDriver in C#. Selenium WebDriver Recipes in C#, Second Edition contains hundreds ...
selenium webdriver基于python源码案例,全是案例适合小白入门学习
selenium webdriver2 环境搭建