From d1ea77dce7d85641b0f99416e95baf1ab4e124dc Mon Sep 17 00:00:00 2001 From: aguspe Date: Sun, 2 Jun 2024 09:56:34 +0200 Subject: [PATCH 1/6] Migrate code to examples --- .../spec/browsers/internet_explorer_spec.rb | 51 ++++++++++++++++++ .../browsers/internet_explorer.en.md | 51 ++++++------------ .../browsers/internet_explorer.ja.md | 53 ++++++------------ .../browsers/internet_explorer.pt-br.md | 54 ++++++------------- .../browsers/internet_explorer.zh-cn.md | 53 ++++++------------ 5 files changed, 118 insertions(+), 144 deletions(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index f3c2d32a25e9..043fc7219456 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -17,6 +17,40 @@ options = Selenium::WebDriver::Options.ie @driver = Selenium::WebDriver.for :ie, options: options end + + it 'sets the file upload dialog timeout' do + options = Selenium::WebDriver::IE::Options.new + options.file_upload_dialog_timeout = 2000 + driver = Selenium::WebDriver.for(:ie, options: options) + driver.quit + end + + it 'ensures a clean session' do + options = Selenium::WebDriver::IE::Options.new + options.ensure_clean_session = true + driver = Selenium::WebDriver.for(:ie, options: options) + driver.quit + end + + it 'ignores the zoom setting' do + options = Selenium::WebDriver::IE::Options.new + options.ignore_zoom_level = true + driver = Selenium::WebDriver.for(:ie, options: options) + driver.quit + end + + it 'ignores the protected mode settings' do + options = Selenium::WebDriver::IE::Options.new + options.ignore_protected_mode_settings = true + driver = Selenium::WebDriver.for(:ie, options: options) + driver.quit + end + + it 'adds the silent option' do + options = Selenium::WebDriver::IE::Options.new + options.add_option('silent', {silent: true}) + expect(options.instance_variable_get(:@options)['silent']).to eq({silent: true}) + end end describe 'Service' do @@ -66,4 +100,21 @@ @driver = Selenium::WebDriver.for :ie, service: service end end + + describe 'Command line options' do + it 'sets the command line options' do + require 'selenium-webdriver' + options = Selenium::WebDriver::IE::Options.new + options.force_create_process_api = true + options.add_argument('-k') + driver = Selenium::WebDriver.for(:ie, options: options) + + begin + driver.get 'https://google.com' + puts(driver.capabilities.to_json) + ensure + driver.quit + end + end + end end diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md index ed5ec54df34e..a85901f51219 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md @@ -113,10 +113,8 @@ var options = new InternetExplorerOptions(); options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.file_upload_dialog_timeout = 2000 -driver = Selenium::WebDriver.for(:ie, options: options) + {{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -168,10 +166,8 @@ var options = new InternetExplorerOptions(); options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ensure_clean_session = true -driver = Selenium::WebDriver.for(:ie, options: options) + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -218,11 +214,9 @@ var options = new InternetExplorerOptions(); options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_zoom_level = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ignoreZoomSetting(true); @@ -278,11 +272,9 @@ var options = new InternetExplorerOptions(); options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_protected_mode_settings = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().introduceFlakinessByIgnoringProtectedModeSettings(true); @@ -327,9 +319,9 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} - {{< badge-code >}} - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); let caps = Capabilities.ie(); @@ -437,20 +429,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -options.add_argument('-k') -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md index e7d30dca1f96..1da5876d8dae 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md @@ -110,10 +110,8 @@ var options = new InternetExplorerOptions(); options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.file_upload_dialog_timeout = 2000 -driver = Selenium::WebDriver.for(:ie, options: options) + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -162,11 +160,9 @@ var options = new InternetExplorerOptions(); options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ensure_clean_session = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ensureCleanSession(true); @@ -211,11 +207,9 @@ var options = new InternetExplorerOptions(); options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_zoom_level = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ignoreZoomSetting(true); @@ -267,11 +261,9 @@ var options = new InternetExplorerOptions(); options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_protected_mode_settings = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().introduceFlakinessByIgnoringProtectedModeSettings(true); @@ -314,9 +306,9 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} - {{< badge-code >}} - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); let caps = Capabilities.ie(); @@ -424,20 +416,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -options.add_argument('-k') -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md index b877e65ae56b..66e2f6670f72 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md @@ -114,10 +114,8 @@ var options = new InternetExplorerOptions(); options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.file_upload_dialog_timeout = 2000 -driver = Selenium::WebDriver.for(:ie, options: options) + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -169,11 +167,9 @@ var options = new InternetExplorerOptions(); options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ensure_clean_session = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ensureCleanSession(true); @@ -219,11 +215,9 @@ var options = new InternetExplorerOptions(); options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_zoom_level = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ignoreZoomSetting(true); @@ -279,11 +273,9 @@ var options = new InternetExplorerOptions(); options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_protected_mode_settings = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().introduceFlakinessByIgnoringProtectedModeSettings(true); @@ -328,9 +320,9 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} - # Por favor inclua um PR para adicionar uma amostra de código - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); let caps = Capabilities.ie(); @@ -438,21 +430,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -options.add_argument('-k') -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - # Navegar para URL - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md index 7a038cb2579d..7c02177311bc 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md @@ -110,10 +110,8 @@ var options = new InternetExplorerOptions(); options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.file_upload_dialog_timeout = 2000 -driver = Selenium::WebDriver.for(:ie, options: options) + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -164,11 +162,9 @@ var options = new InternetExplorerOptions(); options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ensure_clean_session = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ensureCleanSession(true); @@ -214,11 +210,9 @@ var options = new InternetExplorerOptions(); options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_zoom_level = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().ignoreZoomSetting(true); @@ -273,11 +267,9 @@ var options = new InternetExplorerOptions(); options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} -options = Selenium::WebDriver::IE::Options.new -options.ignore_protected_mode_settings = true -driver = Selenium::WebDriver.for(:ie, options: options) - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options().introduceFlakinessByIgnoringProtectedModeSettings(true); @@ -321,9 +313,9 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Ruby" >}} - {{< badge-code >}} - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); let caps = Capabilities.ie(); @@ -434,20 +426,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -options.add_argument('-k') -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); From f8f40ca0448f56163e32f5a58a62aa5dff236a25 Mon Sep 17 00:00:00 2001 From: aguspe Date: Mon, 3 Jun 2024 06:49:31 +0200 Subject: [PATCH 2/6] Finish code migration --- .../spec/browsers/internet_explorer_spec.rb | 37 +++++++++++-------- .../browsers/internet_explorer.en.md | 26 ++++--------- .../browsers/internet_explorer.ja.md | 26 ++++--------- .../browsers/internet_explorer.pt-br.md | 27 ++++---------- .../browsers/internet_explorer.zh-cn.md | 26 ++++--------- 5 files changed, 53 insertions(+), 89 deletions(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index 043fc7219456..8fcb158b6220 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Internet Explorer', exclusive: {platform: :windows} do +RSpec.describe 'Internet Explorer', exclusive: { platform: :windows } do describe 'Options' do let(:edge_location) { ENV.fetch('EDGE_BIN', nil) } @@ -48,8 +48,8 @@ it 'adds the silent option' do options = Selenium::WebDriver::IE::Options.new - options.add_option('silent', {silent: true}) - expect(options.instance_variable_get(:@options)['silent']).to eq({silent: true}) + options.add_option('silent', { silent: true }) + expect(options.instance_variable_get(:@options)['silent']).to eq({ silent: true }) end end @@ -101,20 +101,25 @@ end end - describe 'Command line options' do - it 'sets the command line options' do - require 'selenium-webdriver' - options = Selenium::WebDriver::IE::Options.new - options.force_create_process_api = true - options.add_argument('-k') - driver = Selenium::WebDriver.for(:ie, options: options) + it 'sets the command line options' do + options = Selenium::WebDriver::IE::Options.new + options.add_argument('-k') + driver = Selenium::WebDriver.for(:ie, options: options) + driver.get 'https://google.com' + puts(driver.capabilities.to_json) + driver.quit + end - begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) - ensure - driver.quit - end + it 'launches ie with the create process api' do + options = Selenium::WebDriver::IE::Options.new + options.force_create_process_api = true + driver = Selenium::WebDriver.for(:ie, options: options) + + begin + driver.get 'https://google.com' + puts(driver.capabilities.to_json) + ensure + driver.quit end end end diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md index a85901f51219..bb76a58c4f86 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md @@ -430,7 +430,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -522,19 +522,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -593,7 +583,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L34" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -624,7 +614,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L43" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -653,7 +643,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L54" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -681,7 +671,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L64" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md index 1da5876d8dae..cee3cc7305bb 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md @@ -417,7 +417,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -507,19 +507,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -581,7 +571,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L34" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -612,7 +602,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L43" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -641,7 +631,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L54" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -669,7 +659,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L64" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md index 66e2f6670f72..656ed33c6976 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md @@ -431,7 +431,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -523,20 +523,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - # Navegar para Url - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -597,7 +586,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L34" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -628,7 +617,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L43" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -657,7 +646,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L54" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -685,7 +674,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L64" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md index 7c02177311bc..f03933b089f7 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md @@ -427,7 +427,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L106-L117" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -518,19 +518,9 @@ namespace ieTest { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -options = Selenium::WebDriver::IE::Options.new -options.force_create_process_api = true -driver = Selenium::WebDriver.for(:ie, options: options) - -begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) -ensure - driver.quit -end - {{< /tab >}} +{{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -591,7 +581,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L34" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -622,7 +612,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L43" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -651,7 +641,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L54" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -679,7 +669,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L64" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} From eb323739a31f2c5ac379022ab6f9cd0acb72bf9d Mon Sep 17 00:00:00 2001 From: aguspe Date: Thu, 6 Jun 2024 06:30:45 +0200 Subject: [PATCH 3/6] Refactor code migration --- .../spec/browsers/internet_explorer_spec.rb | 69 +++++++++---------- .../browsers/internet_explorer.en.md | 26 +++---- .../browsers/internet_explorer.ja.md | 26 +++---- .../browsers/internet_explorer.pt-br.md | 26 +++---- .../browsers/internet_explorer.zh-cn.md | 26 +++---- 5 files changed, 83 insertions(+), 90 deletions(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index 8fcb158b6220..4624e48ea009 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -5,9 +5,16 @@ RSpec.describe 'Internet Explorer', exclusive: { platform: :windows } do describe 'Options' do let(:edge_location) { ENV.fetch('EDGE_BIN', nil) } + let(:url) { 'https://www.selenium.dev/selenium/web/' } + + before do + @options = Selenium::WebDriver::IE::Options.new + @options.attach_to_edge_chrome = true + @options.edge_executable_path = edge_location + end it 'basic options Win10' do - options = Selenium::WebDriver::Options.ie + options = Selenium::WebDriver::IE::Options.new options.attach_to_edge_chrome = true options.edge_executable_path = edge_location @driver = Selenium::WebDriver.for :ie, options: options @@ -19,37 +26,45 @@ end it 'sets the file upload dialog timeout' do - options = Selenium::WebDriver::IE::Options.new - options.file_upload_dialog_timeout = 2000 - driver = Selenium::WebDriver.for(:ie, options: options) + @options.file_upload_dialog_timeout = 2000 + driver = Selenium::WebDriver.for(:ie, options: @options) driver.quit end it 'ensures a clean session' do - options = Selenium::WebDriver::IE::Options.new - options.ensure_clean_session = true - driver = Selenium::WebDriver.for(:ie, options: options) + @options.ensure_clean_session = true + driver = Selenium::WebDriver.for(:ie, options: @options) driver.quit end it 'ignores the zoom setting' do - options = Selenium::WebDriver::IE::Options.new - options.ignore_zoom_level = true - driver = Selenium::WebDriver.for(:ie, options: options) + @options.ignore_zoom_level = true + driver = Selenium::WebDriver.for(:ie, options: @options) driver.quit end it 'ignores the protected mode settings' do - options = Selenium::WebDriver::IE::Options.new - options.ignore_protected_mode_settings = true - driver = Selenium::WebDriver.for(:ie, options: options) + @options.ignore_protected_mode_settings = true + driver = Selenium::WebDriver.for(:ie, options: @options) driver.quit end it 'adds the silent option' do - options = Selenium::WebDriver::IE::Options.new - options.add_option('silent', { silent: true }) - expect(options.instance_variable_get(:@options)['silent']).to eq({ silent: true }) + @options.add_option('silent', {silent: true}) + Selenium::WebDriver.for(:ie, options: @options) + expect(@options.instance_variable_get(:@options)['silent']).to eq({silent: true}) + end + + it 'sets the command line options' do + @options.add_argument('-k') + Selenium::WebDriver.for(:ie, options: @options) + end + + it 'launches ie with the create process api' do + @options.force_create_process_api = true + Selenium::WebDriver.for(:ie, options: @options) + expect(@options.instance_variable_get(:@options)['force_create_process_api']) + .to eq({force_create_process_api: true}) end end @@ -100,26 +115,4 @@ @driver = Selenium::WebDriver.for :ie, service: service end end - - it 'sets the command line options' do - options = Selenium::WebDriver::IE::Options.new - options.add_argument('-k') - driver = Selenium::WebDriver.for(:ie, options: options) - driver.get 'https://google.com' - puts(driver.capabilities.to_json) - driver.quit - end - - it 'launches ie with the create process api' do - options = Selenium::WebDriver::IE::Options.new - options.force_create_process_api = true - driver = Selenium::WebDriver.for(:ie, options: options) - - begin - driver.get 'https://google.com' - puts(driver.capabilities.to_json) - ensure - driver.quit - end - end end diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md index bb76a58c4f86..19050845521a 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md @@ -38,7 +38,7 @@ Starting a Microsoft Edge browser in Internet Explorer Compatibility mode with b {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L35-L38" >}} {{% /tab %}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L10-L13" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -68,7 +68,7 @@ So, if IE is not on the system, you only need: {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L44-L45" >}} {{% /tab %}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L18" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L24-L25" >}} {{< /tab >}} {{< tab header="JavaScript" >}} let driver = await new Builder() @@ -114,7 +114,7 @@ options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L30" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -167,7 +167,7 @@ options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L35-L36" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -215,7 +215,7 @@ options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L41-L42" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -273,7 +273,7 @@ options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L47-L48" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -320,7 +320,7 @@ options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L53-L54" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); @@ -430,7 +430,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L59-L60" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -523,7 +523,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} + {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L64-L65" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -583,7 +583,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -614,7 +614,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -643,7 +643,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -671,7 +671,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L113" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md index cee3cc7305bb..9e3f90725e48 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.ja.md @@ -38,7 +38,7 @@ Starting a Microsoft Edge browser in Internet Explorer Compatibility mode with b {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L35-L38" >}} {{% /tab %}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L10-L13" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -67,7 +67,7 @@ So, if IE is not on the system, you only need: {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L44-L45" >}} {{% /tab %}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L18" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L24-L25" >}} {{< /tab >}} {{< tab header="JavaScript" >}} let driver = await new Builder() @@ -111,7 +111,7 @@ options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L30" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -161,7 +161,7 @@ options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L35-L36" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -208,7 +208,7 @@ options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L41-L42" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -262,7 +262,7 @@ options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L47-L48" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -307,7 +307,7 @@ options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L53-L54" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); @@ -417,7 +417,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L59-L60" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -508,7 +508,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L64-L65" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -571,7 +571,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -602,7 +602,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -631,7 +631,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -659,7 +659,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L113" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md index 656ed33c6976..a1769f9575a7 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.pt-br.md @@ -38,7 +38,7 @@ usando um conjunto de opções básicas: {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L35-L38" >}} {{% /tab %}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L10-L13" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -68,7 +68,7 @@ So, if IE is not on the system, you only need: {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L44-L45" >}} {{% /tab %}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L18" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L24-L25" >}} {{< /tab >}} {{< tab header="JavaScript" >}} let driver = await new Builder() @@ -115,7 +115,7 @@ options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L30" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -168,7 +168,7 @@ options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L35-L36" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -216,7 +216,7 @@ options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L41-L42" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -274,7 +274,7 @@ options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L47-L48" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -321,7 +321,7 @@ options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L53-L54" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); @@ -431,7 +431,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L59-L60" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -524,7 +524,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L64-L65" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -586,7 +586,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -617,7 +617,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -646,7 +646,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -674,7 +674,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L113" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md index f03933b089f7..fc1a0e42b4b9 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/internet_explorer.zh-cn.md @@ -38,7 +38,7 @@ Starting a Microsoft Edge browser in Internet Explorer Compatibility mode with b {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L35-L38" >}} {{% /tab %}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L10-L13" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L20" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -67,7 +67,7 @@ So, if IE is not on the system, you only need: {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L44-L45" >}} {{% /tab %}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L17-L18" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L24-L25" >}} {{< /tab >}} {{< tab header="JavaScript" >}} let driver = await new Builder() @@ -111,7 +111,7 @@ options.FileUploadDialogTimeout = TimeSpan.FromMilliseconds(2000); var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L22-L24" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L30" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -163,7 +163,7 @@ options.EnsureCleanSession = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L29-L31" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L35-L36" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -211,7 +211,7 @@ options.IgnoreZoomLevel = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L36-L38" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L41-L42" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -268,7 +268,7 @@ options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new RemoteWebDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} -{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L43-L45" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L47-L48" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -314,7 +314,7 @@ options.AddAdditionalInternetExplorerOption("silent", true); IWebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L50-L51" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L53-L54" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder,By, Capabilities} = require('selenium-webdriver'); @@ -427,7 +427,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L105-L107" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L59-L60" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -519,7 +519,7 @@ namespace ieTest { } {{< /tab >}} {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L114-L116" >}} +{{< gh-codeblock path="/examples/ruby/spec/browsers/internet_explorer_spec.rb#L64-L65" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); @@ -581,7 +581,7 @@ Property value: String representing path to log file {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L68" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -612,7 +612,7 @@ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L77" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -641,7 +641,7 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L88" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -669,7 +669,7 @@ Property value: String representing path to supporting files directory {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L98" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/internet_explorer_spec.rb#L113" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} From f7e0e4b85dd4a13b2f9d7fbeff30602eab43df2b Mon Sep 17 00:00:00 2001 From: aguspe Date: Sun, 16 Jun 2024 12:17:05 +0200 Subject: [PATCH 4/6] Update examples --- examples/ruby/spec/browsers/internet_explorer_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index 4624e48ea009..bf3763f888a1 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Internet Explorer', exclusive: { platform: :windows } do +RSpec.describe 'Internet Explorer', exclusive: {platform: :windows} do describe 'Options' do let(:edge_location) { ENV.fetch('EDGE_BIN', nil) } let(:url) { 'https://www.selenium.dev/selenium/web/' } @@ -50,9 +50,9 @@ end it 'adds the silent option' do - @options.add_option('silent', {silent: true}) + @options.add_option('silent', true) Selenium::WebDriver.for(:ie, options: @options) - expect(@options.instance_variable_get(:@options)['silent']).to eq({silent: true}) + expect(@options.instance_variable_get(:@options)['silent']).to eq(true) end it 'sets the command line options' do @@ -60,7 +60,7 @@ Selenium::WebDriver.for(:ie, options: @options) end - it 'launches ie with the create process api' do + it 'launches ie with the create process api', skip: 'When using with IE 8 or higher, it needs a registry value' do @options.force_create_process_api = true Selenium::WebDriver.for(:ie, options: @options) expect(@options.instance_variable_get(:@options)['force_create_process_api']) From 98fc94835a0fc73ce2f3e2585ec6d80cc4e32436 Mon Sep 17 00:00:00 2001 From: aguspe Date: Tue, 18 Jun 2024 21:43:11 +0200 Subject: [PATCH 5/6] Update silent options --- examples/ruby/spec/browsers/internet_explorer_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index bf3763f888a1..38fe96502b7f 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -50,9 +50,8 @@ end it 'adds the silent option' do - @options.add_option('silent', true) - Selenium::WebDriver.for(:ie, options: @options) - expect(@options.instance_variable_get(:@options)['silent']).to eq(true) + @options.silent = true + expect(@options.silent).to be_truthy end it 'sets the command line options' do From 4bb5ff9d5f030c745b93b8e4d5a99f219776ef41 Mon Sep 17 00:00:00 2001 From: aguspe Date: Wed, 19 Jun 2024 08:19:56 +0200 Subject: [PATCH 6/6] Update silent options --- examples/ruby/spec/browsers/internet_explorer_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index 38fe96502b7f..63aa20096c4b 100644 --- a/examples/ruby/spec/browsers/internet_explorer_spec.rb +++ b/examples/ruby/spec/browsers/internet_explorer_spec.rb @@ -49,7 +49,7 @@ driver.quit end - it 'adds the silent option' do + it 'adds the silent option', skip: 'This capability will be added on the release 4.22.0' do @options.silent = true expect(@options.silent).to be_truthy end