driver.Manage().Logs.GetLog(LogType.Browser) no longer working in Chromedriver version 75.0.3770

五迷三道 提交于 2019-12-06 23:50:39

问题


I am working on a Selenium framework using C# .net and Selenium Webdriver (with Chromedriver). I recently updated to the latest version of Chromedriver 75.0.3770.8 and now one of my lines of code is no longer working:

driver.Manage().Logs.GetLog(LogType.Browser)

My ChromeOptions are set as follows:

options.SetLoggingPreference(LogType.Browser, LogLevel.Severe);

None of this has changed - the only update I've made is to Chromedriver 75. If I revert back to Chromedriver 74 then this code works again. Currently it is failing with "object reference not set to an instance of an object". The release notes for this version of Chromedriver mentioned "Resolved issue 2536: Make standards mode (goog:chromeOptions.w3c:true) the default [Pri-2]" and "Resolved issue 2803: Capability name loggingPrefs is not spec compliant [Pri-2]"

Other than that I can't see anything that could possibly be causing this to fail. Is this something that is no longer supported? Or is there something I need to replace my code with? Thanks


回答1:


From SeleniumHQ:

"Getting logs from Chrome in w3c mode is not going to work till the next selenium client libs (and server) release"




回答2:


i'am using

KeywordLogger log = new KeywordLogger(); log.logInfo("");



来源:https://stackoverflow.com/questions/56558361/driver-manage-logs-getloglogtype-browser-no-longer-working-in-chromedriver-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!