Basic Selenium

How to remove Disable Developer Mode Extension in Selenium

Firefox browser on mac using Selenium webdriver

While working with Selenium Webdriver using Chrome browser you might get one additional popup. You can Disable Developer Mode Extension in Chrome using some additional code.

Before moving into this post  you should be familiar with Chrome with Selenium Webdriver.

Disable Developer Mode Extension in Chrome

Code snippet

//Set the chrome path
System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe");

// Create object of ChromeOptions class
ChromeOptions options = new ChromeOptions();

// add parameter which will disable the extension
options.addArguments("--disable-extensions");

// Start the chrome session
WebDriver driver = new ChromeDriver(options);

 

This in one of the smallest post because it solves only specific post. You can embed this code in your BaseClass or in Browser Factory which starts the test.

 

 

author-avatar

About Mukesh Otwani

I am Mukesh Otwani working professional in a beautiful city Bangalore India. I completed by BE from RGPV university Bhopal. I have passion towards automation testing since couple of years I started with Selenium then I got chance to work with other tools like Maven, Ant, Git, GitHub, Jenkins, Sikuli, Selenium Builder etc.

17 thoughts on “How to remove Disable Developer Mode Extension in Selenium

  1. Guy says:

    How can this be done in Firefox and IE as well?

    1. Hi Guy,

      You can use FirefoxOptions for same but for IE, it won’t work because there is no such development for IE from concerned vendor

  2. Rajasekaran says:

    HI Mukesh,

    The Disable Developer Mode Extension still i get the pop up after adding the code.
    options.addArguments(“–disable-extensions”);

    1. Hi Rajasekaran,

      Use options.addArguments(“–disable-notifications”);

  3. Manoji says:

    Hi Mukesh,

    After adding this code snnipet its working fine but in the url i am getting just data; not getting the url

    1. Manoji says:

      hi mukesh….i got the solution,as soon as i changed the chromedriver version to 2.25 its working gud

      1. Hi Manoji,

        Good to see your reply.

  4. Shylaja R says:

    Yes Mukesh. When the chrome open same popup is coming. i went to extensions. It is showing only one extension that “Chrome Automation Extension 1
    Exposes extension APIs for automating Chrome”

    1. Hi Shylaja,

      Did you add the same chromeOptions in you script before calling chrome browser? Also check the version of chromedriver you are using. Upgrade it to atleast 2.26.

  5. Sri Datta says:

    Thanks Mukesh Bhai. It worked

  6. mallikarjuna says:

    super brother

    1. Thanks Mallikarjuna 🙂

  7. Nawaz says:

    Hi Mukesh, i get the below error while running chrome with Selenium3.0, however its working fine with Firefox.. please help

    Thanks in advance.

  8. Rakesh says:

    I was getting same Extention while working with chrome browser copy pasted above given code but still getting same extention.

    1. Strange its working code in my machine.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.