title: Get client-side logs in Selenium
body: <p>I'm using Selenium in C# and would like to read the client-side logs (like <code>console.log</code> in javascript).</p>
  <p>I'm initializing the ChromeDriver and setting the logging preference to Client:</p>
  <pre><code>ChromeOptions options = new ChromeOptions();
  options.SetLoggingPreference(LogType.Client, LogLevel.All);
  var webDriver = new ChromeDriver(options);
  objectContainer.RegisterInstanceAs&lt;IWebDriver&gt;(webDriver);
  </code></pre>
  <p>However, when I try to retrieve the AvailableLogTypes:</p>
  <pre><code>var whatever = driver.Manage().Logs.AvailableLogTypes;
  </code></pre>
  <p><code>browser</code> and <code>driver</code> are the only available log types to read from:</p>
  <p><a href="https://i.stack.imgur.com/fafDe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fafDe.png" alt="enter image description here" /></a></p>
  <p>When I try to get the Client logs:</p>
  <pre><code>var logs = driver.Manage().Logs.GetLog(LogType.Client);
  </code></pre>
  <p>I get an exception:</p>
  <blockquote>
  <p>An exception of type 'System.InvalidOperationException' occurred in WebDriver.dll but was not handled in user code</p>
  <p>Additional information: unknown error: log type 'client' not found</p>
  </blockquote>
  <p>Any idea how I can fix this? It seems like it defaults back to <code>browser</code> and <code>driver</code> logging at some point but I'm not sure where.</p>