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.
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.
Guy says
How can this be done in Firefox and IE as well?
Mukesh Otwani says
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
Rajasekaran says
HI Mukesh,
The Disable Developer Mode Extension still i get the pop up after adding the code.
options.addArguments(“–disable-extensions”);
Mukesh Otwani says
Hi Rajasekaran,
Use options.addArguments(“–disable-notifications”);
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
Manoji says
hi mukesh….i got the solution,as soon as i changed the chromedriver version to 2.25 its working gud
Mukesh Otwani says
Hi Manoji,
Good to see your reply.
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”
Mukesh Otwani says
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.
Sri Datta says
Thanks Mukesh Bhai. It worked
Mukesh Otwani says
Cheers
mallikarjuna says
super brother
Mukesh Otwani says
Thanks Mallikarjuna 🙂
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.
Mukesh Otwani says
Hi Nawaz,
Kindly use Chrome driver 2.25 https://chromedriver.storage.googleapis.com/index.html
Rakesh says
I was getting same Extention while working with chrome browser copy pasted above given code but still getting same extention.
Mukesh Otwani says
Strange its working code in my machine.