开发者

Webdriver.quit() crashes python on test end in IE

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>
  </Event开发者_JAVA技巧Data>
</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


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜