Running Chrome in headless mode with Selenium C#

In this post we are going to discuss about running Chrome in headless mode with Selenium C#

Chrome headless

Headless Chrome is a way to run Chrome browser without the actual browser UI being spawned. Essentially its running Chrome without chrome! It brings all modern web platform features provided by Chromium and the Blink rendering engine to the command line and automation testing tool such as Selenium in our case

Where is it useful ?

  • A headless browser is a great tool for automated testing and server environments where you don’t need a visible UI shell.
  • And again its not a completely new technology, since there are other big players in this area such as
    • PhantomJS
    • HTMLUnitDriver

So when is Chrome Headless available ?

  • Chrome Headless is supported from Chrome 59.x and above.
  • The current stable version for Windows 10 is Chrome 60.x
  • ChromeDriver v2.30 and above supports headless mode

What changes should I make in my Existing Selenium test ?

Here is the complete video of the above discussion


Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Karthik KK


  1. MZ says:

    Thanks a lot for the post. I tried to follow the same steps, but didn’t work out. I used :
    Chrome Version 59.0.3071.115 (Official Build) (64-bit)
    Windows 10 64 bit
    package id=”Selenium.WebDriver.ChromeDriver” version=”2.31.0″ targetFramework=”net45″ /> this is the same ChromeDriver that you guys mentioned in you video.

    the problem I have is that it does not recognize the IWebDriver and it keeps giving me missing-reference error. I really appreciate you help.

    • Karthik kk says:

      Did you added Selenium reference in your project ?

      Also make sure you have installed Chrome latest version which is 60.x now

      Karthik KK

  2. Geoff says:

    Have you successfully used the remote debugging port option with selenium C#? I have tried using this option to allow me to debug some issues I’m having with moving my automated tests from PhantomJS to headless Chrome but I get a timeout error when using the remote debugging port as an option

  3. Mahi says:

    Hi, I need to validate URL of a page launched in headless chrome browser for my automation validation. please help me how to code that.

  4. Carlos Henrique says:

    Hello Karthik , thanks for article, very usefull.

    I would like to ask you. I have an NetCore.Web 2.0 application and would like to know if it is compatible with CrhomeDriver. (I’m developing a webservice do read a url and catch some info from there, that page are using angularjs).

Leave a Reply

Your email address will not be published. Required fields are marked *