diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index f3c2d32a25e9..63aa20096c4b 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 @@ -17,6 +24,47 @@ options = Selenium::WebDriver::Options.ie @driver = Selenium::WebDriver.for :ie, options: options end + + it 'sets the file upload dialog timeout' do + @options.file_upload_dialog_timeout = 2000 + driver = Selenium::WebDriver.for(:ie, options: @options) + driver.quit + end + + it 'ensures a clean session' do + @options.ensure_clean_session = true + driver = Selenium::WebDriver.for(:ie, options: @options) + driver.quit + end + + it 'ignores the zoom setting' do + @options.ignore_zoom_level = true + driver = Selenium::WebDriver.for(:ie, options: @options) + driver.quit + end + + it 'ignores the protected mode settings' do + @options.ignore_protected_mode_settings = true + driver = Selenium::WebDriver.for(:ie, options: @options) + driver.quit + end + + 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 + + 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', 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']) + .to eq({force_create_process_api: true}) + end end describe 'Service' do 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..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() @@ -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#L29-L30" >}} {{< /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#L35-L36" >}} {{< /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#L41-L42" >}} +{{< /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#L47-L48" >}} +{{< /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#L53-L54" >}} +{{< /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#L59-L60" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -541,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#L64-L65" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -612,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#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -643,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#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -672,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#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -700,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#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 e7d30dca1f96..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() @@ -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#L29-L30" >}} {{< /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#L35-L36" >}} +{{< /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#L41-L42" >}} +{{< /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#L47-L48" >}} +{{< /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#L53-L54" >}} +{{< /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#L59-L60" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -526,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#L64-L65" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -600,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#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -631,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#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -660,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#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -688,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#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 b877e65ae56b..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() @@ -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#L29-L30" >}} {{< /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#L35-L36" >}} +{{< /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#L41-L42" >}} +{{< /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#L47-L48" >}} +{{< /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#L53-L54" >}} +{{< /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#L59-L60" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -543,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#L64-L65" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -617,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#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -648,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#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -677,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#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -705,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#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 7a038cb2579d..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() @@ -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#L29-L30" >}} {{< /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#L35-L36" >}} +{{< /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#L41-L42" >}} +{{< /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#L47-L48" >}} +{{< /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#L53-L54" >}} +{{< /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#L59-L60" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -537,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#L64-L65" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const ie = require('selenium-webdriver/ie'); let options = new ie.Options(); @@ -610,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#L83" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -641,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#L101" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -670,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#L103" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -698,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#L113" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}}