Skip to content

Commit fa5b814

Browse files
authored
[rb] fix Ruby tests failing because of alerts in Firefox (#17294)
* fix Ruby tests failing because of alerts in Firefox Seems that Firefox behavior with alerts was changed. Without "unhandledPromptBehavior" capability, command `wait_for_alert` is always failing in FireFox.
1 parent 2a18444 commit fa5b814

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ def firefox_options(args: [], **opts)
324324
opts[:browser_version] = 'stable' if WebDriver::Platform.windows?
325325
opts[:web_socket_url] = true if ENV['WEBDRIVER_BIDI'] && !opts.key?(:web_socket_url)
326326
opts[:binary] ||= rlocation(ENV['FIREFOX_BINARY']) if ENV.key?('FIREFOX_BINARY')
327+
opts[:unhandled_prompt_behavior] ||= 'ignore'
327328
args << '--headless' if ENV['HEADLESS']
328329
WebDriver::Options.firefox(args: args, **opts)
329330
end

0 commit comments

Comments
 (0)