Merge pull request #13931 from rabbitmq/fix-selenium-issue
Fix selenium issue closing popup warning dialog since recent upgrade
This commit is contained in:
commit
510d2ca0ab
|
@ -14,7 +14,7 @@ const ADMIN_TAB = By.css('div#menu ul#tabs li#admin')
|
||||||
const STREAM_CONNECTIONS_TAB = By.css('div#menu ul#tabs li#stream-connections')
|
const STREAM_CONNECTIONS_TAB = By.css('div#menu ul#tabs li#stream-connections')
|
||||||
|
|
||||||
const FORM_POPUP_WARNING = By.css('div.form-popup-warn')
|
const FORM_POPUP_WARNING = By.css('div.form-popup-warn')
|
||||||
const FORM_POPUP_WARNING_CLOSE_BUTTON = By.css('div.form-popup-warn span#close')
|
const FORM_POPUP_WARNING_CLOSE_BUTTON = By.css('div.form-popup-warn span')
|
||||||
|
|
||||||
const FORM_POPUP_OPTIONS = By.css('div.form-popup-options')
|
const FORM_POPUP_OPTIONS = By.css('div.form-popup-options')
|
||||||
const ADD_MINUS_BUTTON = By.css('div#main table.list thead tr th.plus-minus')
|
const ADD_MINUS_BUTTON = By.css('div#main table.list thead tr th.plus-minus')
|
||||||
|
|
|
@ -64,6 +64,25 @@ module.exports = {
|
||||||
let chromeCapabilities = Capabilities.chrome();
|
let chromeCapabilities = Capabilities.chrome();
|
||||||
const options = new chrome.Options()
|
const options = new chrome.Options()
|
||||||
chromeCapabilities.setAcceptInsecureCerts(true);
|
chromeCapabilities.setAcceptInsecureCerts(true);
|
||||||
|
let seleniumArgs = [
|
||||||
|
"--window-size=1920,1080",
|
||||||
|
"--enable-automation",
|
||||||
|
"guest",
|
||||||
|
"disable-infobars",
|
||||||
|
"--disable-notifications",
|
||||||
|
"--lang=en",
|
||||||
|
"--disable-search-engine-choice-screen",
|
||||||
|
"disable-popup-blocking",
|
||||||
|
"--credentials_enable_service=false",
|
||||||
|
"profile.password_manager_enabled=false",
|
||||||
|
"profile.reduce-security-for-testing",
|
||||||
|
"profile.managed_default_content_settings.popups=1",
|
||||||
|
"profile.managed_default_content_settings.notifications.popups=1",
|
||||||
|
"profile.password_manager_leak_detection=false"
|
||||||
|
]
|
||||||
|
if (!runLocal) {
|
||||||
|
seleniumArgs.push("--headless=new")
|
||||||
|
}
|
||||||
chromeCapabilities.set('goog:chromeOptions', {
|
chromeCapabilities.set('goog:chromeOptions', {
|
||||||
excludeSwitches: [ // disable info bar
|
excludeSwitches: [ // disable info bar
|
||||||
'enable-automation',
|
'enable-automation',
|
||||||
|
@ -71,21 +90,7 @@ module.exports = {
|
||||||
prefs: {
|
prefs: {
|
||||||
'profile.password_manager_enabled' : false
|
'profile.password_manager_enabled' : false
|
||||||
},
|
},
|
||||||
args: [
|
args: seleniumArgs
|
||||||
"--enable-automation",
|
|
||||||
"guest",
|
|
||||||
"disable-infobars",
|
|
||||||
"--disable-notifications",
|
|
||||||
"--lang=en",
|
|
||||||
"--disable-search-engine-choice-screen",
|
|
||||||
"disable-popup-blocking",
|
|
||||||
"--credentials_enable_service=false",
|
|
||||||
"profile.password_manager_enabled=false",
|
|
||||||
"profile.reduce-security-for-testing",
|
|
||||||
"profile.managed_default_content_settings.popups=1",
|
|
||||||
"profile.managed_default_content_settings.notifications.popups=1",
|
|
||||||
"profile.password_manager_leak_detection=false"
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
let driver = builder
|
let driver = builder
|
||||||
.forBrowser('chrome')
|
.forBrowser('chrome')
|
||||||
|
|
Loading…
Reference in New Issue