Merge pull request #13931 from rabbitmq/fix-selenium-issue

Fix selenium issue closing popup warning dialog since recent upgrade
This commit is contained in:
Michael Klishin 2025-05-23 03:22:44 +04:00 committed by GitHub
commit 510d2ca0ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 16 deletions

View File

@ -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')

View File

@ -64,14 +64,8 @@ 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);
chromeCapabilities.set('goog:chromeOptions', { let seleniumArgs = [
excludeSwitches: [ // disable info bar "--window-size=1920,1080",
'enable-automation',
],
prefs: {
'profile.password_manager_enabled' : false
},
args: [
"--enable-automation", "--enable-automation",
"guest", "guest",
"disable-infobars", "disable-infobars",
@ -86,6 +80,17 @@ module.exports = {
"profile.managed_default_content_settings.notifications.popups=1", "profile.managed_default_content_settings.notifications.popups=1",
"profile.password_manager_leak_detection=false" "profile.password_manager_leak_detection=false"
] ]
if (!runLocal) {
seleniumArgs.push("--headless=new")
}
chromeCapabilities.set('goog:chromeOptions', {
excludeSwitches: [ // disable info bar
'enable-automation',
],
prefs: {
'profile.password_manager_enabled' : false
},
args: seleniumArgs
}); });
let driver = builder let driver = builder
.forBrowser('chrome') .forBrowser('chrome')