gpt4 book ai didi

python - Webdriver.quit() 在 IE 中的测试结束时使 python 崩溃

转载 作者:行者123 更新时间:2023-11-28 19:27:12 25 4
gpt4 key购买 nike

我正在使用通过 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)

该函数调用位于IE版本的webdriver.py模块中。

系统规范:

操作系统:Windows 7

浏览器:IE 9

Selenium 版本:2.0

正如 Tourman 所建议的,我向 Selenium 开发人员提出了一个问题。问题可以在这里找到: http://code.google.com/p/selenium/issues/detail?id=2408

最佳答案

这听起来像是 Webdriver 中的错误,但如果没有堆栈跟踪和有问题的函数代码,就没什么可看的了。

我会将其提交给开发人员:

http://code.google.com/p/selenium/

关于python - Webdriver.quit() 在 IE 中的测试结束时使 python 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7323967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com