From 93926779ae7eaf986f0ef57b810e510b8d75f34d Mon Sep 17 00:00:00 2001 From: aguspe Date: Tue, 18 Jun 2024 21:42:13 +0200 Subject: [PATCH] Adds support for the w3c silent option for the ruby library --- rb/lib/selenium/webdriver/ie/options.rb | 3 ++- rb/spec/unit/selenium/webdriver/ie/options_spec.rb | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rb/lib/selenium/webdriver/ie/options.rb b/rb/lib/selenium/webdriver/ie/options.rb index b649c38fbaaad..155ee134a742f 100644 --- a/rb/lib/selenium/webdriver/ie/options.rb +++ b/rb/lib/selenium/webdriver/ie/options.rb @@ -42,7 +42,8 @@ class Options < WebDriver::Options use_legacy_file_upload_dialog_handling: 'ie.useLegacyFileUploadDialogHandling', attach_to_edge_chrome: 'ie.edgechromium', edge_executable_path: 'ie.edgepath', - ignore_process_match: 'ie.ignoreprocessmatch' + ignore_process_match: 'ie.ignoreprocessmatch', + silent: 'silent' }.freeze BROWSER = 'internet explorer' diff --git a/rb/spec/unit/selenium/webdriver/ie/options_spec.rb b/rb/spec/unit/selenium/webdriver/ie/options_spec.rb index b5e17a17eb0bd..30df493003f3b 100644 --- a/rb/spec/unit/selenium/webdriver/ie/options_spec.rb +++ b/rb/spec/unit/selenium/webdriver/ie/options_spec.rb @@ -57,6 +57,7 @@ module IE use_legacy_file_upload_dialog_handling: true, attach_to_edge_chrome: true, edge_executable_path: '/path/to/edge', + silent: true, 'custom:options': {foo: 'bar'}) expect(opts.args.to_a).to eq(%w[foo bar]) @@ -87,6 +88,7 @@ module IE expect(opts.timeouts).to eq(script: 40000, page_load: 400000, implicit: 1) expect(opts.set_window_rect).to be(false) expect(opts.options[:'custom:options']).to eq(foo: 'bar') + expect(opts.silent).to be_truthy end it 'has native events on by default' do @@ -131,6 +133,7 @@ module IE platform_name: 'win10', accept_insecure_certs: false, page_load_strategy: 'eager', + silent: true, unhandled_prompt_behavior: 'accept', strict_file_interactability: true, timeouts: {script: 40000, @@ -187,7 +190,8 @@ module IE 'ie.usePerProcessProxy' => true, 'ie.useLegacyFileUploadDialogHandling' => true, 'ie.edgechromium' => true, - 'ie.edgepath' => '/path/to/edge'}) + 'ie.edgepath' => '/path/to/edge', + 'silent' => true}) end end end # Options