Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 751
Fieldfare Avatar asked Jun 12 '19 09:06

Fieldfare


People also ask

How do I know if ChromeDriver is working?

Execute google.py - A new chrome browser is open and redirect to www.google.com. Execute yahoo.py - If webdriver. Chrome is executed/existed, then assign the browser to driver variable. Else launch new browser.

Does ChromeDriver need selenium?

As Google Chrome dominates the browser market, the use of a ChromeDriver becomes a must. Selenium WebDriver uses the ChromeDriver to communicate test scripts with Google Chrome. It is used to navigate between web pages and provide input to the same.


1 Answers

From SeleniumHQ:

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

like image 131
Fieldfare Avatar answered Oct 13 '22 23:10

Fieldfare