Hi,
I’ve successfully added a chrome extension and I can see it when running the tests, however, I need to turn it on for the extension actually to work, and I couldn’t find any solution.
I want to add Google Analytics Debugger and turn it on:
Code to add extension
System.setProperty("webdriver.chrome.driver", "D:/Katalon/BB8 Automated tests/BB8 Automated tests/Test Files/chromedriver.exe")
ChromeOptions options = new ChromeOptions()
options.addExtensions(new File("D:/Katalon/BB8 Automated tests/BB8 Automated tests/Test Files/extension_2_8_0_0.crx"))
DesiredCapabilities capabilities = new DesiredCapabilities()
capabilities.setCapability(ChromeOptions.CAPABILITY, options)
WebDriver driver = new ChromeDriver(capabilities)
DriverFactory.changeWebDriver(driver)
WebUI.navigateToUrl("google.com")
The default view when the fresh browser is opened, extension in only installed but not turned on:
Extension turned on after I manually click on it: