Webdriver.quit() 在 IE 测试端使 python 崩溃
我正在使用通过 Python 实现的 Webdriver 在 IE 中运行我的 selenium 测试脚本;但是,当我调用 webdriver.quit() 时,这会随机导致 python 崩溃。当测试用例结束并调用 webdriver.quit 时,会弹出一个 Windows 提示,详细说明 python.exe 已崩溃。在进入事件查看器并查看其中一个错误时,我发现了以下内容:
-General-
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x4cf14060
Faulting module name: IEDriver.dll, version: 0.0.0.0, time stamp: 0x4e2dbecc
Exception code: 0xc0000005
Fault offset: 0x0007f0ae
Faulting process id: 0x2148
Faulting application start time: 0x01cc6ca18a2b2d5a
Faulting application path: C:\Python27\python.exe
Faulting module path: C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll
Report Id: e1f5cf3c-d894-11e0-ac1f-782bcb930798
-Detailed-
Log Name: Application
Source: Application Error
Date: 9/6/2011 10:31:18 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: Balt-002670.SYSALLI.com
Description:
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x4cf14060
Faulting module name: IEDriver.dll, version: 0.0.0.0, time stamp: 0x4e2dbecc
Exception code: 0xc0000005
Fault offset: 0x0007f0ae
Faulting process id: 0x2148
Faulting application start time: 0x01cc6ca18a2b2d5a
Faulting application path: C:\Python27\python.exe
Faulting module path: C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll
Report Id: e1f5cf3c-d894-11e0-ac1f-782bcb930798
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-09-06T14:31:18.000000000Z" />
<EventRecordID>7302</EventRecordID>
<Channel>Application</Channel>
<Computer>Balt-002670.SYSALLI.com</Computer>
<Security />
</System>
<EventData>
<Data>python.exe</Data>
<Data>0.0.0.0</Data>
<Data>4cf14060</Data>
<Data>IEDriver.dll</Data>
<Data>0.0.0.0</Data>
<Data>4e2dbecc</Data>
<Data>c0000005</Data>
<Data>0007f0ae</Data>
<Data>2148</Data>
<Data>01cc6ca18a2b2d5a</Data>
<Data>C:\Python27\python.exe</Data>
<Data>C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll</Data>
<Data>e1f5cf3c-d894-11e0-ac1f-782bcb930798</Data>
</EventData>
</Event>
通过调试方法,我确定以下代码行导致崩溃:
RemoteWebDriver.quit(self)
该函数调用位于webdriver.py 模块的 IE 版本。
系统规格:
操作系统:Windows 7
浏览器:IE 9
Selenium 版本:2.0
正如 Tourman 所建议的,我向 Selenium 开发人员提出了一个问题。该问题可以在这里找到: http://code.google.com/p/selenium/issues/detail ?id=2408
I am using Webdriver implemented through Python to run my selenium test scripts in IE; however, when I call webdriver.quit(), this will randomly cause python to crash. When a test case ends and webdriver.quit is called, a windows prompt pops up detailing that python.exe has crashed. Upon going to the event viewer and looking at one of these errors, I found the following:
-General-
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x4cf14060
Faulting module name: IEDriver.dll, version: 0.0.0.0, time stamp: 0x4e2dbecc
Exception code: 0xc0000005
Fault offset: 0x0007f0ae
Faulting process id: 0x2148
Faulting application start time: 0x01cc6ca18a2b2d5a
Faulting application path: C:\Python27\python.exe
Faulting module path: C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll
Report Id: e1f5cf3c-d894-11e0-ac1f-782bcb930798
-Detailed-
Log Name: Application
Source: Application Error
Date: 9/6/2011 10:31:18 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: Balt-002670.SYSALLI.com
Description:
Faulting application name: python.exe, version: 0.0.0.0, time stamp: 0x4cf14060
Faulting module name: IEDriver.dll, version: 0.0.0.0, time stamp: 0x4e2dbecc
Exception code: 0xc0000005
Fault offset: 0x0007f0ae
Faulting process id: 0x2148
Faulting application start time: 0x01cc6ca18a2b2d5a
Faulting application path: C:\Python27\python.exe
Faulting module path: C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll
Report Id: e1f5cf3c-d894-11e0-ac1f-782bcb930798
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-09-06T14:31:18.000000000Z" />
<EventRecordID>7302</EventRecordID>
<Channel>Application</Channel>
<Computer>Balt-002670.SYSALLI.com</Computer>
<Security />
</System>
<EventData>
<Data>python.exe</Data>
<Data>0.0.0.0</Data>
<Data>4cf14060</Data>
<Data>IEDriver.dll</Data>
<Data>0.0.0.0</Data>
<Data>4e2dbecc</Data>
<Data>c0000005</Data>
<Data>0007f0ae</Data>
<Data>2148</Data>
<Data>01cc6ca18a2b2d5a</Data>
<Data>C:\Python27\python.exe</Data>
<Data>C:\Python27\lib\site-packages\selenium\webdriver\ie\IEDriver.dll</Data>
<Data>e1f5cf3c-d894-11e0-ac1f-782bcb930798</Data>
</EventData>
</Event>
Through debugging methods, I have determined that the following line of code is causing the crash:
RemoteWebDriver.quit(self)
This function call is located in the IE version of the webdriver.py module.
System specs:
OS : Windows 7
Browser: IE 9
Selenium version: 2.0
As Tourman suggested, I opened an issue up with the Selenium developers. The issue can be found here:
http://code.google.com/p/selenium/issues/detail?id=2408
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来像是 Webdriver 中的一个错误,但如果没有堆栈跟踪和有问题的函数代码,就没有太多可看的了。
我会将其提交给开发人员:
http://code.google.com/p/selenium/< /a>
It sounds like a bug in Webdriver, but without a stack trace and the offending function code there's not a whole lot to look at.
I would bring it up to the developers:
http://code.google.com/p/selenium/