title: Selenium WebDriver Switch Browser Offline C#
body: <p>I am trying to switch my browser to offline in middle of the tests. In Network tab I can do it manually as shown in picture below.</p>
  <p><img src="https://i.stack.imgur.com/NqYYM.png" alt="Picture" /></p>
  <p>I have tried this and did not work because ChromeNetworkConditions seems to be non  existent.</p>
  <pre><code>var driver = new ChromeDriver(); 
  
  driver.NetworkConditions = new ChromeNetworkConditions()
  {
      IsOffline = true, 
      DownloadThroughput = 5000, 
      UploadThroughput = 5000, 
      Latency = TimeSpan.FromMilliseconds(5) 
  };
  </code></pre>
  <p>I can not get this code to work on my <code>.NET6.0 Selenium 4.3.0</code></p>
  <p>Does <code>ChromeNetworkConditions()</code> still exist? If yes, what is the library I should import?</p>
  <p>Anyone has any idea how to switch to offline with Selenium  WebDriver on <code>.net 4.3.0</code> ?</p>