I have to run an extension but a warning "Disable Developer Mode" always block the test case to complete. I know a command line switch that will disable this warning --force-dev-mode-highlighting but don't know how to use this

Do someone know how?

Following is the code I used to open chrome with extension.

ChromeOptions options = new ChromeOptions();
options.addExtensions(new File("C:\\Users\\abc\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\fdpohaocaechififmbbbbbknoalclacl\\2.2_0\\Full-Page-Screen-Capture_v2.2.crx"));      
driver = new ChromeDriver(options); 

1 Answer 1


You can use the --force-dev-mode-highlighting switch by invoking an addArguments method that's in the ChromeOptions class:


However, this switch does not prevent the warning message from showing up.

If the following are used, then Chrome can be run with at least one extension enabled and without the warning (and the code that you've provided will work without the issue occurring):
1. V̲e̲r̲s̲i̲o̲n̲ ̲3̲.̲3̲.̲1 of the Selenium Java Client Driver
2. C̲h̲r̲o̲m̲e̲D̲r̲i̲v̲e̲r̲ ̲2̲.̲2̲8
3. C̲h̲r̲o̲m̲e̲ ̲5̲8̲.̲0̲.̲3̲0̲2̲9̲.̲8̲1

  • Updating Chrome driver to 2.29 solved the issue
    – Rabia Asif
    Commented May 17, 2017 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.