温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

robotframework+selenium2library运行常见问题

发布时间:2020-08-06 00:49:56 来源:网络 阅读:6532 作者:icestick8586 栏目:软件技术

问题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'


解决方案:找到Selenium2Libraryutils目录,修改其中的browsercache.py文件,将def close(self):方法中的语句“browser.quit()”修改为“browser.close()”。即可解决此问题。




向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI