selenium问题汇总

来源:互联网 发布:ip端口查询工具 编辑:程序博客网 时间:2024/05/02 01:35

一、Could not start running tests with command jybot.py

运行测试用例的时候,界面出现如下报错提示框

解决方法:把运行方式由jybot修改成pybot就可以了

原因:本人的环境是python+rfs,所以需要pybot运行


二、20140116 10:40:44.256 :  INFO : Opening browser 'ie' to base url 'http://10.12.3.24:8180/sp/portal/main.jsp#'
20140116 10:40:44.261 :  FAIL : No browser is open
20140116 10:40:44.261 :  WARN : Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
20140116 10:40:44.263 :  FAIL : WebDriverException: Message: 'IEDriver executable needs to be available in the path.                 Please download from http://code.google.com/p/selenium/downloads/list                and read up at http://code.google.com/p/selenium/wiki/InternetExplorerDriver' 
Ending test:   Demo1.Suite1.testcase1

解决方法:把IEDriverServer.exe放到python的路径下面。系统变量设置了python的path,你需要把IEDriverServer.exe放到c盘Python27这个目录下面(拷贝粘贴即可)

原因:没有把IEDriverServer.exe放到python的path下面

其他可能的原因:

1、没有下载IEDriverServer.exe,你需要下载IEDriverServer.exe并且把它放到python的路径下面。通常报错信息如下:

WebDriverException: Message: 'IEDriver executable needs to be available in the path. Please download from http://code.google.com/p/selenium/downloads/list and read up at http://code.google.com/p/selenium/wiki/InternetExplorerDriver'

2、没有修改IE的保护模式设置导致,通常看到报错信息如下:

WebDriverException: Message: u'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选项设置的安全页中,4个区域的启用保护模式的勾选都去掉(或都勾上)

3、其他可能的问题有IE的代理服务器设置被打勾了需要去掉勾选,进程里有IEDRIVERSERVER.EXE的进程没有杀掉等等


0 0