如何使用python selenium获取internet explorer的浏览器控制台日志
我正在使用python selenium和internet explorer为HTML5 web应用程序编写一个测试自动化套件。如何使用python selenium获取internet explorer的浏览器控制台日志。我设法在GoogleChrome上获得了同一应用程序的控制台日志如何使用python selenium获取internet explorer的浏览器控制台日志,python,selenium-webdriver,Python,Selenium Webdriver,我正在使用python selenium和internet explorer为HTML5 web应用程序编写一个测试自动化套件。如何使用python selenium获取internet explorer的浏览器控制台日志。我设法在GoogleChrome上获得了同一应用程序的控制台日志 chromedriver="C:\Python27\chromedriver.exe" os.environ["webdriver.chrome.driver"]=chromedriver # enable b
chromedriver="C:\Python27\chromedriver.exe"
os.environ["webdriver.chrome.driver"]=chromedriver
# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = { 'browser':'ALL' }
driver=webdriver.Chrome(executable_path=chromedriver,desired_capabilities=d)
# test specific code in python selenium
# printing the chrome browser specific logs on console
for entry in driver.get_log('browser'):
for key,val in entry.items() :
if key == "message" :
print val
在上面的代码中,“print val”将在控制台上打印chrome浏览器日志。但相同的代码不适用于internet explorer
我将特定于chrome的信息替换为特定于internet explorer的信息]
Iedriver="C:\Python27\IEDriverServer.exe"
os.environ["webdriver.Ie.driver"]= Iedriver
# enable browser logging
d = DesiredCapabilities.INTERNETEXPLORER
d['loggingPrefs'] = { 'browser':'ALL' }
driver=webdriver.Ie(Iedriver,d)
但我无法获取特定于浏览器的日志。有人能帮我吗?如何使用python selenium在internet explorer上获取任何应用程序的浏览器控制台?internet explorer驱动程序不支持检索任何类型的日志。这些功能将被忽略,从语言绑定到JSON wire协议的日志端点的调用将返回错误响应。SPI协议定义不清,在其设计中几乎没有考虑。作为W3C规范工作的一部分,它正在被审查和重新设计。一旦重新设计完成,我希望IE驱动程序在那个时候采用支持