Update Selenium config for 4.0 compatibility.
This commit is contained in:
parent
65b4ce9e65
commit
f83c48fc00
1 changed files with 9 additions and 15 deletions
|
@ -7,21 +7,19 @@
|
||||||
Capybara.register_driver(:zammad_chrome) do |app|
|
Capybara.register_driver(:zammad_chrome) do |app|
|
||||||
|
|
||||||
# Turn on browser logs
|
# Turn on browser logs
|
||||||
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
options = Selenium::WebDriver::Chrome::Options.new(
|
||||||
loggingPrefs: {
|
logging_prefs: {
|
||||||
browser: 'ALL'
|
browser: 'ALL'
|
||||||
},
|
},
|
||||||
chromeOptions: {
|
|
||||||
prefs: {
|
prefs: {
|
||||||
'intl.accept_languages' => 'en-US',
|
'intl.accept_languages' => 'en-US',
|
||||||
'profile.default_content_setting_values.notifications' => 1, # ALLOW notifications
|
'profile.default_content_setting_values.notifications' => 1, # ALLOW notifications
|
||||||
},
|
},
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
browser: :chrome,
|
browser: :chrome,
|
||||||
desired_capabilities: capabilities,
|
options: options
|
||||||
}
|
}
|
||||||
|
|
||||||
if ENV['REMOTE_URL'].present?
|
if ENV['REMOTE_URL'].present?
|
||||||
|
@ -40,13 +38,9 @@ Capybara.register_driver(:zammad_firefox) do |app|
|
||||||
profile['general.useragent.locale'] = 'en-US'
|
profile['general.useragent.locale'] = 'en-US'
|
||||||
profile['permissions.default.desktop-notification'] = 1 # ALLOW notifications
|
profile['permissions.default.desktop-notification'] = 1 # ALLOW notifications
|
||||||
|
|
||||||
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(
|
|
||||||
firefox_profile: profile,
|
|
||||||
)
|
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
browser: :firefox,
|
browser: :firefox,
|
||||||
desired_capabilities: capabilities,
|
options: Selenium::WebDriver::Firefox::Options.new(profile: profile),
|
||||||
}
|
}
|
||||||
|
|
||||||
if ENV['REMOTE_URL'].present?
|
if ENV['REMOTE_URL'].present?
|
||||||
|
|
Loading…
Reference in a new issue