Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98358

Selenium disable extension [duplicate]

$
0
0

Getting failed to load extension from: blah blah Loading of unpacked extensions is disabled by the administartor

var webdriver = require("selenium-webdriver");
var chrome = require("selenium-webdriver/chrome");
var chromeCapabilities = webdriver.Capabilities.chrome();

/**
 * Set chrome command line options/switches
 */

var chromeOptions = new chrome.Options();
chromeOptions.addArguments("test-type");
chromeOptions.excludeSwitches("useAutomationExtension");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("--js-flags=--expose-gc");
chromeOptions.addArguments("--enable-precise-memory-info");
chromeOptions.addArguments("--disable-popup-blocking");
chromeOptions.addArguments("--disable-default-apps");
chromeOptions.addArguments("--disable-infobars");

driver = new webdriver.Builder()
  .forBrowser("chrome")
  .setChromeOptions(chromeOptions)
  .build();

driver.get("http://www.google.com");

Viewing all articles
Browse latest Browse all 98358

Trending Articles