What is Chrome Option in Selenium?

1. ChromeOptions in Selenium which will help to manage options like (browser in headless mode, disable info bar, add Extensions, setBinary, Load default or custom profile) to Chrome Driver.

2. ChromeOptions class extends MutableCapabilities.

3. If you want to pass any capabilities, try to use ChromeOptions.

Ex.1.  Chrome Automation Info-bar

           ChromeOptions options = new ChromeOptions();

    //disable automation info bar


  1. Load Default/Custom Chrome Profile :-


  1. Using a Chrome executable in a non-standard location :-


  1. Headless Chrome


  1. Load Extensions

String extFilePath = “D:/extensions/file.extension”; ChromeOptions options = new ChromeOptions(); options.addExtensions(new File(extFilePath));

finally write below line

WebDriver driver = new ChromeDriver(options);

6. To accept untrusted certificate

Shashank Verma

Shashank is an information technology graduate, keen observer and a perfection seeker. Passionate about browser as well as Robotic Process Automation