Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Loading of unpacked extensions is disabled by the administrator

While launching chrome browser using selenium Chrome Driver, you may have seen below Popup Message sometime. This popup message will not allow you to load web browser for test execution, so here we are providing workaround to hide this popup message.


Use the below method to disable the popup message using chromeOptions of selenium webdriver.



Method -1 :
ChromeOptions option = new ChromeOptions();
option
.addArguments("disable-extensions");
driver
= new ChromeDriver(option);

Method -2 :
ChromeOptions option = new ChromeOptions();
option
.setExperimentalOption("useAutomationExtension", false);
driver
= new ChromeDriver(option);

Lets see the complete example to disable popup message (Loading of unpacked extensions is disabled by the administrator)
SeleniumDemo.java
package demoPackage;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class SeleniumDemo {

public static WebDriver driver;

public static void main(String[] args) {
// TODO Auto-generated method stub

System.out.println("Launching the chrome driver ");

//using chrome options
ChromeOptions option = new ChromeOptions();
//option.addArguments("disable-extensions");
//OR
option
.setExperimentalOption("useAutomationExtension", false);

// Set the chrome driver exe file path
System.setProperty("webdriver.chrome.driver","E:\\selenium_sumit\\chromedriver_win32_2.33\\chromedriver.exe");

// Instantiate the chrome driver
driver
= new ChromeDriver(option);

// set the browser URL in get() to load the webpage
driver
.get("https://google.com/");

}

}

Console output :






This post first appeared on PHP Update Data In MySQL Database, please read the originial post: here

Share the post

Loading of unpacked extensions is disabled by the administrator

×

Subscribe to Php Update Data In Mysql Database

Get updates delivered right to your inbox!

Thank you for your subscription

×