diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.ja.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.ja.md new file mode 100644 index 000000000000..a154424f13cd --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.ja.md @@ -0,0 +1,82 @@ +--- +title: "Chrome DevTools Protocol" +linkTitle: "CDP" +weight: 10 +description: > + Examples of working with Chrome DevTools Protocol in Selenium. + CDP support is temporary until WebDriver BiDi has been implemented. +aliases: [ +"/documentation/en/support_packages/chrome_devtools/", +"/documentation/support_packages/chrome_devtools/", +"/documentation/webdriver/bidirectional/chrome_devtools/", +"documentation/webdriver/bidirectional/chrome_devtools/cdp_endpoint/", +"documentation/webdriver/bidirectional/chrome_devtools/bidi_api/", +"documentation/webdriver/bidirectional/chrome_devtools/cdp_api/", +] +--- + +{{% pageinfo color="warning" %}} +
+ + Page being translated from English to Japanese. + Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +Many browsers provide "DevTools" -- a set of tools that are integrated with the browser that +developers can use to debug web apps and explore the performance of their pages. Google Chrome's +DevTools make use of a protocol called the Chrome DevTools Protocol (or "CDP" for short). +As the name suggests, this is not designed for testing, nor to have a stable API, so functionality +is highly dependent on the version of the browser. + +Selenium is working to implement a standards-based, cross-browser, stable alternative to CDP called +[WebDriver BiDi]. Until the support for this new protocol has finished, Selenium plans to provide access +to CDP features where applicable. + +### Using Chrome DevTools Protocol with Selenium + +Chrome and Edge have a method to send basic CDP commands. +This does not work for features that require bidirectional communication, and you need to know what domains to enable when +and the exact names and types of domains/methods/parameters. + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpTest.java#L22-L27" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_cdp.py#L2-L7" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/CDPTest.cs#L14-L21" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/cdp_spec.rb#L9-L13" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-code >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +To make working with CDP easier, and to provide access to the more advanced features, Selenium bindings +automatically generate classes and methods for the most common domains. +CDP methods and implementations can change from version to version, though, so you want to keep the +version of Chrome and the version of DevTools matching. Selenium supports the 3 most +recent versions of Chrome at any given time, +and tries to time releases to ensure that access to the latest versions are available. + +This limitation provides additional challenges for several bindings, where dynamically +generated CDP support requires users to regularly update their code to reference the proper version of CDP. +In some cases an idealized implementation has been created that should work for any version of CDP without the +user needing to change their code, but that is not always available. + +Examples of how to use CDP in your Selenium tests can be found on the following pages, but +we want to call out a couple commonly cited examples that are of limited practical value. +* **Geo Location** — almost all sites use the IP address to determine physical location, +so setting an emulated geolocation rarely has the desired effect. +* **Overriding Device Metrics** — Chrome provides a great API for setting [Mobile Emulation](https://chromedriver.chromium.org/mobile-emulation) +in the Options classes, which is generally superior to attempting to do this with CDP. diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.pt-br.md new file mode 100644 index 000000000000..79ccc306a1a9 --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.pt-br.md @@ -0,0 +1,82 @@ +--- +title: "Chrome DevTools Protocol" +linkTitle: "CDP" +weight: 10 +description: > + Examples of working with Chrome DevTools Protocol in Selenium. + CDP support is temporary until WebDriver BiDi has been implemented. +aliases: [ +"/documentation/en/support_packages/chrome_devtools/", +"/documentation/support_packages/chrome_devtools/", +"/documentation/webdriver/bidirectional/chrome_devtools/", +"documentation/webdriver/bidirectional/chrome_devtools/cdp_endpoint/", +"documentation/webdriver/bidirectional/chrome_devtools/bidi_api/", +"documentation/webdriver/bidirectional/chrome_devtools/cdp_api/", +] +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Japanese. Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +Many browsers provide "DevTools" -- a set of tools that are integrated with the browser that +developers can use to debug web apps and explore the performance of their pages. Google Chrome's +DevTools make use of a protocol called the Chrome DevTools Protocol (or "CDP" for short). +As the name suggests, this is not designed for testing, nor to have a stable API, so functionality +is highly dependent on the version of the browser. + +Selenium is working to implement a standards-based, cross-browser, stable alternative to CDP called +[WebDriver BiDi]. Until the support for this new protocol has finished, Selenium plans to provide access +to CDP features where applicable. + +### Using Chrome DevTools Protocol with Selenium + +Chrome and Edge have a method to send basic CDP commands. +This does not work for features that require bidirectional communication, and you need to know what domains to enable when +and the exact names and types of domains/methods/parameters. + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpTest.java#L22-L27" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_cdp.py#L2-L7" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/CDPTest.cs#L14-L21" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/cdp_spec.rb#L9-L13" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-code >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +To make working with CDP easier, and to provide access to the more advanced features, Selenium bindings +automatically generate classes and methods for the most common domains. +CDP methods and implementations can change from version to version, though, so you want to keep the +version of Chrome and the version of DevTools matching. Selenium supports the 3 most +recent versions of Chrome at any given time, +and tries to time releases to ensure that access to the latest versions are available. + +This limitation provides additional challenges for several bindings, where dynamically +generated CDP support requires users to regularly update their code to reference the proper version of CDP. +In some cases an idealized implementation has been created that should work for any version of CDP without the +user needing to change their code, but that is not always available. + +Examples of how to use CDP in your Selenium tests can be found on the following pages, but +we want to call out a couple commonly cited examples that are of limited practical value. +* **Geo Location** — almost all sites use the IP address to determine physical location, +so setting an emulated geolocation rarely has the desired effect. +* **Overriding Device Metrics** — Chrome provides a great API for setting [Mobile Emulation](https://chromedriver.chromium.org/mobile-emulation) +in the Options classes, which is generally superior to attempting to do this with CDP. diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md index 198e6d8c95f2..45c20b63adb4 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md @@ -15,6 +15,15 @@ aliases: [ ] --- +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Chinese. Do you speak Chinese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + Many browsers provide "DevTools" -- a set of tools that are integrated with the browser that developers can use to debug web apps and explore the performance of their pages. Google Chrome's DevTools make use of a protocol called the Chrome DevTools Protocol (or "CDP" for short). diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.ja.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.ja.md new file mode 100644 index 000000000000..2654fcf63f9a --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.ja.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Logging Features" +linkTitle: "Logging" +weight: 2 +description: > + Logging features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from English to Japanese. + Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Console Logs + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/LoggingTest.java#L31" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L11-12" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L19-L25" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L12" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +## JavaScript Exceptions + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L22-L23" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L41-L47" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L26" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.pt-br.md new file mode 100644 index 000000000000..8c000045ebbd --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.pt-br.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Logging Features" +linkTitle: "Logging" +weight: 2 +description: > + Logging features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Japanese. Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Console Logs + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/LoggingTest.java#L31" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L11-12" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L19-L25" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L12" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +## JavaScript Exceptions + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L22-L23" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L41-L47" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L26" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.zh-cn.md new file mode 100644 index 000000000000..ab59bb7aeaca --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/logging.zh-cn.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Logging Features" +linkTitle: "Logging" +weight: 2 +description: > + Logging features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Chinese. Do you speak Chinese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Console Logs + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/LoggingTest.java#L31" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L11-12" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L19-L25" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L12" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +## JavaScript Exceptions + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_logs.py#L22-L23" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/LoggingTest.cs#L41-L47" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/logging_spec.rb#L26" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/network.ja.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.ja.md new file mode 100644 index 000000000000..1b9819ae3a21 --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.ja.md @@ -0,0 +1,196 @@ +--- +title: "Chrome DevTools Network Features" +linkTitle: "Network" +weight: 4 +description: > + Network features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from English to Japanese. + Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Basic authentication + +Some applications make use of browser authentication to secure pages. +It used to be common to handle them in the URL, but browsers stopped supporting this. +With this code you can insert the credentials into the header when necessary + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L41-L43" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L13-15" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L25-L32" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L9-L11" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Network Interception + +Both requests and responses can be recorded or transformed. + +#### Response information + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L56-L65" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L46-L51" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L20-L24" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +#### Response transformation + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L75-L85" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L62-L73" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L31-L35" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +#### Request interception + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L97-L110" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L85-L97" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L42-L46" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Performance Metrics + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L125-L126" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L26-L28" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L114-L118" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L56-L57" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Setting Cookies + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L142-L157" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L37-L44" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L136-L143" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L68-L71" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Waiting for Downloads + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L171-L176" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L82-L88" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/network.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.pt-br.md new file mode 100644 index 000000000000..abcc6812d5a6 --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.pt-br.md @@ -0,0 +1,196 @@ +--- +title: "Chrome DevTools Network Features" +linkTitle: "Network" +weight: 4 +description: > + Network features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Japanese. Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Basic authentication + +Some applications make use of browser authentication to secure pages. +It used to be common to handle them in the URL, but browsers stopped supporting this. +With this code you can insert the credentials into the header when necessary + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L41-L43" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L13-15" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L25-L32" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L9-L11" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Network Interception + +Both requests and responses can be recorded or transformed. + +#### Response information + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L56-L65" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L46-L51" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L20-L24" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +#### Response transformation + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L75-L85" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L62-L73" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L31-L35" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +#### Request interception + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L97-L110" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L85-L97" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L42-L46" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Performance Metrics + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L125-L126" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L26-L28" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L114-L118" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L56-L57" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Setting Cookies + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L142-L157" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L37-L44" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L136-L143" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L68-L71" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Waiting for Downloads + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L171-L176" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L82-L88" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/network.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.zh-cn.md new file mode 100644 index 000000000000..1932f83c8f77 --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/network.zh-cn.md @@ -0,0 +1,196 @@ +--- +title: "Chrome DevTools Network Features" +linkTitle: "Network" +weight: 4 +description: > + Network features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Chinese. Do you speak Chinese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + + +## Basic authentication + +Some applications make use of browser authentication to secure pages. +It used to be common to handle them in the URL, but browsers stopped supporting this. +With this code you can insert the credentials into the header when necessary + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L41-L43" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L13-15" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L25-L32" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L9-L11" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Network Interception + +Both requests and responses can be recorded or transformed. + +#### Response information + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L56-L65" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L46-L51" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L20-L24" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + +#### Response transformation + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L75-L85" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L62-L73" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L31-L35" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +#### Request interception + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L97-L110" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L85-L97" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L42-L46" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Performance Metrics + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L125-L126" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L26-L28" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L114-L118" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L56-L57" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Setting Cookies + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L142-L157" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_network.py#L37-L44" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs#L136-L143" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L68-L71" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## Waiting for Downloads + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L171-L176" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/network_spec.rb#L82-L88" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.ja.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.ja.md new file mode 100644 index 000000000000..b721b93f9b3c --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.ja.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Script Features" +linkTitle: "Script" +weight: 6 +description: > + Script features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from English to Japanese. + Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + +## Script Pinning + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/ScriptTest.java#L32-L34" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L21-L22" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L12-L13" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## DOM Mutation Handlers + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L44" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L8-L9" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L22" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.pt-br.md new file mode 100644 index 000000000000..343170fe5404 --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.pt-br.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Script Features" +linkTitle: "Script" +weight: 6 +description: > + Script features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Japanese. Do you speak Japanese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + +## Script Pinning + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/ScriptTest.java#L32-L34" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L21-L22" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L12-L13" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## DOM Mutation Handlers + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L44" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L8-L9" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L22" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.zh-cn.md new file mode 100644 index 000000000000..d7f287bd3dff --- /dev/null +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.zh-cn.md @@ -0,0 +1,68 @@ +--- +title: "Chrome DevTools Script Features" +linkTitle: "Script" +weight: 6 +description: > + Script features using CDP. +--- + +{{% pageinfo color="warning" %}} ++ + Page being translated from + English to Chinese. Do you speak Chinese? Help us to translate + it by sending us pull requests! +
+{{% /pageinfo %}} + +{{% pageinfo color="warning" %}} +While Selenium 4 provides direct access to the Chrome DevTools Protocol, these +methods will eventually be removed when WebDriver BiDi implemented. +{{% /pageinfo %}} + +## Script Pinning + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/ScriptTest.java#L32-L34" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L21-L22" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L12-L13" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}} + + +## DOM Mutation Handlers + +{{< tabpane text=true >}} +{{% tab header="Java" %}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java#L44" >}} +{{% /tab %}} +{{% tab header="Python" %}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L8-L9" >}} +{{% /tab %}} +{{% tab header="CSharp" %}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} +{{% /tab %}} +{{% tab header="Ruby" %}} +{{< gh-codeblock path="/examples/ruby/spec/bidi/cdp/script_spec.rb#L22" >}} +{{% /tab %}} +{{% tab header="JavaScript" %}} +{{< badge-implementation >}} +{{% /tab %}} +{{% tab header="Kotlin" %}} +{{< badge-code >}} +{{% /tab %}} +{{< /tabpane >}}