robotframework+selenium2library运行常见问题
2016-08-03 20:48
453 查看
问题1:
command: pybot.bat --argumentfile c:\users\lenovo\appdata\local\temp\RIDEeoqulh.d\argfile.txt --listener D:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:16115:False C:\Users\lenovo\Desktop\test\test
解决方案:把C:\python27\scripts加入环境变量path中
问题2:
WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.
解决方案:设置IE浏览器Internet选项->选择安全->把Internet,本地Intranet,可信站点,受限站点下的启用模式统一都去掉或都选上
问题3:WebDriverException: Message: 'IEDriver executable needs to be available in the path. 解决方案:下载IEDriver或chromeDriver,放在D:\Python27\Scripts,前提是你的python安装在此D盘
问题4:
[WARN]Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'NoneType' object has no attribute 'encode'
解决方案:找到Selenium2Library的utils目录,修改其中的browsercache.py文件,将def close(self):方法中的语句“browser.quit()”修改为“browser.close()”。即可解决此问题。
command: pybot.bat --argumentfile c:\users\lenovo\appdata\local\temp\RIDEeoqulh.d\argfile.txt --listener D:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:16115:False C:\Users\lenovo\Desktop\test\test
解决方案:把C:\python27\scripts加入环境变量path中
问题2:
WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.
解决方案:设置IE浏览器Internet选项->选择安全->把Internet,本地Intranet,可信站点,受限站点下的启用模式统一都去掉或都选上
问题3:WebDriverException: Message: 'IEDriver executable needs to be available in the path. 解决方案:下载IEDriver或chromeDriver,放在D:\Python27\Scripts,前提是你的python安装在此D盘
问题4:
[WARN]Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'NoneType' object has no attribute 'encode'
解决方案:找到Selenium2Library的utils目录,修改其中的browsercache.py文件,将def close(self):方法中的语句“browser.quit()”修改为“browser.close()”。即可解决此问题。
相关文章推荐
- Android之使用Http协议实现文件上传功能
- mysql集群之MMM简单搭建
- 通晓网络测试常用命令
- 插件管理框架 for Delphi(一)
- Windows下Ruby+Watir自动化测试的环境搭建及数据读取
- 使用CSS框架布局的缺点和优点小结
- 一起动手编写Android图片加载框架
- 基于.NET平台常用的框架和开源程序整理
- Nodejs学习笔记之测试驱动
- 列举PHP的Yii 2框架的开发优势
- Windows窗体的.Net框架绘图技术实现方法
- 浅谈JavaScript 框架分类
- 轻量级javascript 框架Backbone使用指南
- javascript实现框架高度随内容改变的方法
- JS刷新框架外页面七种实现代码
- 超赞的动手创建JavaScript框架的详细教程
- 深入探讨前端框架react
- js验证框架实现代码分享
- jQuery的框架介绍
- 简单介绍不用库(框架)自己写ajax