您的位置:首页 > 编程语言 > Python开发

python + selenium2library 自动化框架

2014-02-22 15:19 190 查看
1、运行过程中如果出现:

     WebDriverException:Message: u'Unexpected error launching Internet Explorer. Protected Modesettings are not the same for all zones. Enable Protected Mode must be set tothe same value (enabled or disabled) for all zones.'

这个错误解决方法如下、:

     打开IE的internet选项->安全,将Internet/本地Internet/受信任的站定/受限制的站点中的启用保护模式全部去掉勾,或者全部勾上。

2、可能会遇到如下错误

“[ WARN ] Keyword 'Capture PageScreenshot' could not be run on failure: No browser is open”,

    网上资料说,遇到此问题,请打开文件浏览器至Selenium2Library的utils目录,修改其中的browsercache.py文件,将close(self)方法中的语句“browser.quit()”修改为“browser.close()”。即可解决此问题。但是该方法没有解决第一个问题,因为这个错误可能是第一个问题引起的
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息