Remove or Disable Developer add-on in Chrome while running Selenium Tests

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.


package com.blog.qaearth.acc;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class Basic {
public static void main(String[] args) {
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);
driver.get("https://qaearth.blogspot.in/p/testing-examples.html");
driver.quit();
}
}

In the similar way we can add user agent and other extension related activities