diff --git a/examples/ruby/spec/actions_api/mouse_spec.rb b/examples/ruby/spec/actions_api/mouse_spec.rb index 38b2811db0ad..3e3e0b838455 100644 --- a/examples/ruby/spec/actions_api/mouse_spec.rb +++ b/examples/ruby/spec/actions_api/mouse_spec.rb @@ -108,7 +108,7 @@ expect(y_coord).to be_within(1).of(center_y + 11) end - it 'offset from viewport' do + it 'offset from viewport', {platforn: :linux, reason: 'it only fails on the linux pipeline'} do driver.get 'https://www.selenium.dev/selenium/web/mouse_interaction.html' driver.action diff --git a/examples/ruby/spec/bidi/network_spec.rb b/examples/ruby/spec/bidi/network_spec.rb new file mode 100644 index 000000000000..3f5c52e03035 --- /dev/null +++ b/examples/ruby/spec/bidi/network_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Network', exclusive: {bidi: true, reason: 'only executed when bidi is enabled'}, + only: {browser: %i[chrome edge firefox]} do + let(:driver) { start_bidi_session } + let(:wait) { Selenium::WebDriver::Wait.new(timeout: 2) } + + it 'adds an auth handler', skip: 'Do not execute BiDi test' do + driver.network.add_authentication_handler('test', 'test') + driver.navigate.to url_for('basicAuth') + expect(driver.find_element(tag_name: 'h1').text).to eq('authorized') + end +end diff --git a/examples/ruby/spec/browsers/internet_explorer_spec.rb b/examples/ruby/spec/browsers/internet_explorer_spec.rb index 63aa20096c4b..458c5c726873 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', skip: 'the connection fails on the windows pipeline' do describe 'Options' do let(:edge_location) { ENV.fetch('EDGE_BIN', nil) } let(:url) { 'https://www.selenium.dev/selenium/web/' } @@ -49,7 +49,7 @@ driver.quit end - it 'adds the silent option', skip: 'This capability will be added on the release 4.22.0' do + it 'adds the silent option' do @options.silent = true expect(@options.silent).to be_truthy end @@ -59,7 +59,7 @@ 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 + 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']) diff --git a/website_and_docs/content/documentation/webdriver/bidi/network.en.md b/website_and_docs/content/documentation/webdriver/bidi/network.en.md index 989ec39ca556..1cb55e097150 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/network.en.md +++ b/website_and_docs/content/documentation/webdriver/bidi/network.en.md @@ -17,6 +17,101 @@ For more details, see [Enabling BiDi]({{< ref "BiDi" >}}) ## Authentication Handlers +Authentication handlers enable you to intercept authentication requests that occur during a network interaction. +These handlers are useful for automating scenarios involving authentication prompts, such as Basic Auth or Digest Auth. +They allow you to programmatically provide credentials or modify the authentication flow. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< gh-codeblock path="examples/ruby/spec/bidi/network_spec.rb#L7-L11" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Request Handlers +Request handlers allow you to intercept and manipulate outgoing network requests before they are sent to the server. +This can be used to modify request headers, change the request body, or block specific requests. +Request handlers are essential for testing and debugging scenarios where you need control over outgoing traffic. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Response Handlers + +Response handlers enable you to intercept and manipulate incoming responses from the server. +They are particularly useful for testing scenarios involving response data, such as verifying or modifying response headers, status codes, or content before it reaches the browser. + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Remove Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Clear Handlers + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/network.ja.md b/website_and_docs/content/documentation/webdriver/bidi/network.ja.md index da4e2d7eb0ee..95a81f748645 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/network.ja.md +++ b/website_and_docs/content/documentation/webdriver/bidi/network.ja.md @@ -5,7 +5,7 @@ weight: 1 description: > These features are related to networking, and are made available via a "network" namespace. aliases: [ - "/documentation/ja/webdriver/bidirectional/bidirectional_w3c/network", + "/documentation/en/webdriver/bidirectional/bidirectional_w3c/network", "/documentation/webdriver/bidirectional/webdriver_bidi/network" ] --- @@ -17,6 +17,101 @@ For more details, see [Enabling BiDi]({{< ref "BiDi" >}}) ## Authentication Handlers +Authentication handlers enable you to intercept authentication requests that occur during a network interaction. +These handlers are useful for automating scenarios involving authentication prompts, such as Basic Auth or Digest Auth. +They allow you to programmatically provide credentials or modify the authentication flow. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< gh-codeblock path="examples/ruby/spec/bidi/network_spec.rb#L7-L11" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Request Handlers +Request handlers allow you to intercept and manipulate outgoing network requests before they are sent to the server. +This can be used to modify request headers, change the request body, or block specific requests. +Request handlers are essential for testing and debugging scenarios where you need control over outgoing traffic. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Response Handlers + +Response handlers enable you to intercept and manipulate incoming responses from the server. +They are particularly useful for testing scenarios involving response data, such as verifying or modifying response headers, status codes, or content before it reaches the browser. + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Remove Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Clear Handlers + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/network.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/network.pt-br.md index 60338930f815..95a81f748645 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/network.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/bidi/network.pt-br.md @@ -5,7 +5,7 @@ weight: 1 description: > These features are related to networking, and are made available via a "network" namespace. aliases: [ - "/documentation/pt-br/webdriver/bidirectional/bidirectional_w3c/network", + "/documentation/en/webdriver/bidirectional/bidirectional_w3c/network", "/documentation/webdriver/bidirectional/webdriver_bidi/network" ] --- @@ -17,6 +17,101 @@ For more details, see [Enabling BiDi]({{< ref "BiDi" >}}) ## Authentication Handlers +Authentication handlers enable you to intercept authentication requests that occur during a network interaction. +These handlers are useful for automating scenarios involving authentication prompts, such as Basic Auth or Digest Auth. +They allow you to programmatically provide credentials or modify the authentication flow. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< gh-codeblock path="examples/ruby/spec/bidi/network_spec.rb#L7-L11" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Request Handlers +Request handlers allow you to intercept and manipulate outgoing network requests before they are sent to the server. +This can be used to modify request headers, change the request body, or block specific requests. +Request handlers are essential for testing and debugging scenarios where you need control over outgoing traffic. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Response Handlers + +Response handlers enable you to intercept and manipulate incoming responses from the server. +They are particularly useful for testing scenarios involving response data, such as verifying or modifying response headers, status codes, or content before it reaches the browser. + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Remove Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Clear Handlers + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/network.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/network.zh-cn.md index 4b97ed012af8..95a81f748645 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/network.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/bidi/network.zh-cn.md @@ -5,7 +5,7 @@ weight: 1 description: > These features are related to networking, and are made available via a "network" namespace. aliases: [ - "/documentation/zh-cn/webdriver/bidirectional/bidirectional_w3c/network", + "/documentation/en/webdriver/bidirectional/bidirectional_w3c/network", "/documentation/webdriver/bidirectional/webdriver_bidi/network" ] --- @@ -17,6 +17,101 @@ For more details, see [Enabling BiDi]({{< ref "BiDi" >}}) ## Authentication Handlers +Authentication handlers enable you to intercept authentication requests that occur during a network interaction. +These handlers are useful for automating scenarios involving authentication prompts, such as Basic Auth or Digest Auth. +They allow you to programmatically provide credentials or modify the authentication flow. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< gh-codeblock path="examples/ruby/spec/bidi/network_spec.rb#L7-L11" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Request Handlers +Request handlers allow you to intercept and manipulate outgoing network requests before they are sent to the server. +This can be used to modify request headers, change the request body, or block specific requests. +Request handlers are essential for testing and debugging scenarios where you need control over outgoing traffic. + +### Add Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Response Handlers + +Response handlers enable you to intercept and manipulate incoming responses from the server. +They are particularly useful for testing scenarios involving response data, such as verifying or modifying response headers, status codes, or content before it reaches the browser. + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Remove Handler + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}} + +## Clear Handlers + +{{< tabpane text=true >}} +{{< tab header="Java" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} +{{< /tab >}} +{{< tab header="Ruby" >}} +{{< /tab >}} +{{< tab header="JavaScript" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} +{{< /tab >}} +{{< /tabpane >}}