Dev mentioned that they were using this in their js.
Steps to reproduce -
1. Start the selenium server with chrome driver.
java -jar -Dwebdriver.chrome.driver=chromedriver selenium-server-standalone-2.48.2.jar
2. Go to http://127.0.0.1:4444/wd/hub and create a new chrome session.
3. Open the console in this chrome session and enter window.chrome.runtime, this doesn't seem to be available.
If you open a regular chrome window, open the console and enter window.chrome.runtime - this is available.
Is there anyway to include window.chrome.runtime in the chrome session started by Selenium ?
Thanks
capabilities = WebDriver.Capabilities.chrome().set('chromeOptions', {
args: [
'disable-infobars'
],
excludeSwitches: [
'test-type' // adds chrome.runtime object
]
}),
driver = new WebDriver.Builder()
.forBrowser('chrome')
.withCapabilities(capabilities)
.build()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option('excludeSwitches', ['test-type'])