解决使用robot framework + selenium测试时,RIDE运行一次后不显示log的问题
2018-03-26 11:23
561 查看
转载地址:https://blog.csdn.net/dassh/article/details/50404529#comments
问题
在使用RIDE进行UI自动化测试时,会发现经常运行第二遍不显示下方log,如下![](http://172.16.2.217:8090/download/attachments/5472364/QQ%E6%88%AA%E5%9B%BE20151202141238.png?version=1&modificationDate=1449038255000&api=v2)
原因
代码使用的是谷歌浏览器、IE浏览器测试,运行一次后chromedriver.exe,IEDriverServer.exe进程仍在运行中。解决方案
方法一:每次运行后,手动关闭chromedriver.exe或者IEDriverServer.exe;方法二:将下面代码保存为批处理,每次运行后手动运行一下:taskkill /f /im chromedriver.exetaskkill /f /im IEDriverServer.exe方法三:封装成keywordsstep1: def close_process(self, process_name):"""Close a process by process name."""
if process_name[-4:].lower() != ".exe":
process_name += ".exe"
os.system("taskkill /f /im " + process_name)step2: 保存上述文件至py文件,然后在RIDE中引用,并创建关键字 Teardown
Close Process chromedriver #谷歌 Close Process IEDriverServer #IEstep3: 将Teardown加入test setting: *** Settings ***
Test Teardown Teardown
相关文章推荐
- 解决使用robot framework + selenium测试时,RIDE运行一次后不显示log的问题
- jenkins运行selenium 测试 不显示浏览器 解决方法
- html的img中使用SVG图片做SRC在本地测试可用但是上传服务器后不能显示问题解决
- Robot Framework+RIDE+Selenium环境搭建配置及使用说明
- 以不同用户身份运行程序,/savecred只需要输入一次密码(GetTokenByName取得EXPLORER.EXE的令牌,然后调用CreateProcessAsUser,而且使用LoadUserProfile解决另存文件的问题)good
- 解决从jenkins打开robot framework报告会提示‘Opening Robot Framework log failed ’的问题
- 解决从jenkins打开robot framework报告会提示‘Opening Robot Framework log failed ’的问题
- 解决使用VC运行时库函数wprintf和wcount显示中文不正确的问题
- Entity Framework 5.0运行.NET Framework 4.0之上在查询表达式中使用显示转换的一个问题
- Opening Robot Framework log failed问题解决
- 解决从jenkins打开robot framework报告会提示‘Opening Robot Framework log failed ’的问题
- 解决Jenkins运行robot framework selenium脚本不显示截图的问题
- jenkins运行selenium 测试 不显示浏览器 解决方法
- 解决从jenkins打开robot framework报告会提示‘Opening Robot Framework log failed ’的问题
- 解决使用VC运行时库函数wprintf和wcount显示中文不正确的问题
- VS2012 WIN7下使用DotNetBar 使用Office2007Form皮肤 窗体运行不显示问题解决方法
- html的img中使用SVG图片做SRC在本地测试可用但是上传服务器后不能显示问题解决 标签: SVGMIME TYPE不显示服务器设置 2016-05-21 13:49 2517人阅读 评论(0)
- jenkins运行selenium 测试 不显示浏览器 解决方法
- ViewPager中的PagerTabStrip在运行测试的时候不显示问题解决
- Selenium2学习-024-WebUI自动化实战实例-022-网站不同分辨率下页面样式展示兼容性问题解决方案 -- 设置浏览器显示区域大小(无人值守,节约测试成本的福音,BOSS 最爱)