diff --git a/.github/workflows/dotnet-examples.yml b/.github/workflows/dotnet-examples.yml index 1bf2c7c49778..2b79b75cd9e3 100644 --- a/.github/workflows/dotnet-examples.yml +++ b/.github/workflows/dotnet-examples.yml @@ -61,7 +61,9 @@ jobs: if: matrix.release == 'nightly' && matrix.os != 'windows' run: | - latest_nightly=$(./scripts/latest-nightly-version.sh nuget Selenium.WebDriver) + pip install -r ./scripts/requirements.txt + latest_nightly=$(python ./scripts/latest-nightly-version.py nuget Selenium.WebDriver) + echo $latest_nightly dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly env: @@ -71,7 +73,8 @@ jobs: shell: pwsh run: | - $latest_nightly = ./scripts/latest-nightly-version.ps1 nuget Selenium.WebDriver + pip install -r ./scripts/requirements.txt + $latest_nightly = python ./scripts/latest-nightly-version.py nuget Selenium.WebDriver dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly env: diff --git a/.github/workflows/java-examples.yml b/.github/workflows/java-examples.yml index d30322714972..339ef92f930f 100644 --- a/.github/workflows/java-examples.yml +++ b/.github/workflows/java-examples.yml @@ -45,24 +45,31 @@ jobs: if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up Java + id: java uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 + - name: Import test cert non-Windows + if: matrix.os != 'windows' + run: sudo keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit + - name: Import test cert Windows + if: matrix.os == 'windows' + run: keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit - name: Run Tests Stable if: matrix.release == 'stable' uses: nick-invision/retry@v3.0.0 with: - timeout_minutes: 20 + timeout_minutes: 40 max_attempts: 3 command: | cd examples/java - mvn -B test + mvn -B test -D"jdk.internal.httpclient.disableHostnameVerification=true" - name: Run Tests Nightly Linux/macOS if: matrix.release == 'nightly' && matrix.os != 'windows' uses: nick-invision/retry@v3.0.0 with: - timeout_minutes: 20 + timeout_minutes: 40 max_attempts: 3 command: | pip install yq @@ -70,13 +77,13 @@ jobs: latest_snapshot=$(echo "$xml_content" | xq '.content.data."content-item"' | jq -r 'sort_by(.lastModified) | last | .text') echo "Latest Selenium Snapshot: $latest_snapshot" cd examples/java - mvn -B -U test -Dselenium.version="$latest_snapshot" + mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" - name: Run Tests Nightly Windows if: matrix.release == 'nightly' && matrix.os == 'windows' uses: nick-invision/retry@v3.0.0 with: - timeout_minutes: 20 + timeout_minutes: 40 max_attempts: 3 command: | pip install yq @@ -84,4 +91,4 @@ jobs: $latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r 'sort_by(.lastModified) | last | .text' Write-Output "Latest Selenium Snapshot: $latest_snapshot" cd examples/java - mvn -B -U test "-Dselenium.version=$latest_snapshot" + mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" diff --git a/.github/workflows/js-examples.yml b/.github/workflows/js-examples.yml index b2cfd6964dd1..4c5e51c831b4 100644 --- a/.github/workflows/js-examples.yml +++ b/.github/workflows/js-examples.yml @@ -93,7 +93,9 @@ jobs: if: matrix.release == 'nightly' && matrix.os != 'windows' run: | - latest_nightly=$(./scripts/latest-nightly-version.sh npm selenium-webdriver) + pip install -r ./scripts/requirements.txt + latest_nightly=$(python ./scripts/latest-nightly-version.py npm selenium-webdriver) + echo $latest_nightly npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -102,7 +104,8 @@ jobs: if: matrix.release == 'nightly' && matrix.os == 'windows' run: | - $latest_nightly = ./scripts/latest-nightly-version.ps1 npm selenium-webdriver + pip install -r ./scripts/requirements.txt + $latest_nightly = python ./scripts/latest-nightly-version.py npm selenium-webdriver npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 91e00fa1d8d0..6238c88ef60d 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -25,8 +25,25 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu, windows, macos ] - release: [ stable, nightly ] + include: + - os: ubuntu + release: stable + python: '3.8' + - os: ubuntu + release: nightly + python: '3.11' + - os: windows + release: stable + python: '3.9' + - os: windows + release: nightly + python: '3.12' + - os: macos + release: stable + python: '3.10' + - os: macos + release: nightly + python: '3.13' runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo @@ -47,14 +64,25 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 - - name: Install dependencies nightly - if: matrix.release == 'nightly' - working-directory: ./examples/python + python-version: ${{ matrix.python }} + - name: Install dependencies nightly non-Windows + if: matrix.release == 'nightly' && matrix.os != 'windows' + run: | + pip install -r ./scripts/requirements.txt + latest_nightly_python=$(python ./scripts/latest-python-nightly-version.py) + cd examples/python + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install --index-url https://test.pypi.org/simple/ selenium==$latest_nightly_python --extra-index-url https://pypi.org/simple/ --upgrade --force-reinstall --break-system-packages + - name: Install dependencies nightly Windows + if: matrix.release == 'nightly' && matrix.os == 'windows' run: | + pip install -r ./scripts/requirements.txt + $latest_nightly_python = python ./scripts/latest-python-nightly-version.py + cd examples/python python -m pip install --upgrade pip pip install -r requirements.txt - pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --force-reinstall -v selenium + pip install --index-url https://test.pypi.org/simple/ selenium==$latest_nightly_python --extra-index-url https://pypi.org/simple/ --upgrade --force-reinstall --break-system-packages - name: Install dependencies stable if: matrix.release == 'stable' working-directory: ./examples/python @@ -69,8 +97,8 @@ jobs: - name: Run tests uses: nick-invision/retry@v3.0.0 with: - timeout_minutes: 20 + timeout_minutes: 60 max_attempts: 3 command: | cd examples/python - pytest + pytest --reruns 3 diff --git a/.github/workflows/ruby-examples.yml b/.github/workflows/ruby-examples.yml index 447351266060..5a5c21aa6340 100644 --- a/.github/workflows/ruby-examples.yml +++ b/.github/workflows/ruby-examples.yml @@ -53,7 +53,9 @@ jobs: if: matrix.release == 'nightly' && matrix.os != 'windows' run: | - latest_nightly_webdriver=$(./scripts/latest-nightly-version.sh rubygems selenium-webdriver) + pip install -r ./scripts/requirements.txt + latest_nightly_webdriver=$(python ./scripts/latest-nightly-version.py rubygems selenium-webdriver) + echo $latest_nightly_webdriver cd examples/ruby bundle install bundle remove selenium-webdriver @@ -64,7 +66,8 @@ jobs: if: matrix.release == 'nightly' && matrix.os == 'windows' run: | - $latest_nightly_webdriver = ./scripts/latest-nightly-version.ps1 rubygems selenium-webdriver + pip install -r ./scripts/requirements.txt + $latest_nightly_webdriver = python ./scripts/latest-nightly-version.py rubygems selenium-webdriver cd examples/ruby bundle install bundle remove selenium-webdriver diff --git a/.gitignore b/.gitignore index 43ede48a62fd..c828c5469d5d 100755 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ website_and_docs/resources .settings .gitignore .pydevproject +**/*.iml +**/.gradle diff --git a/examples/dotnet/SeleniumDocs/BaseTest.cs b/examples/dotnet/SeleniumDocs/BaseTest.cs index 7a4cb6998c3b..8cedafeca39f 100644 --- a/examples/dotnet/SeleniumDocs/BaseTest.cs +++ b/examples/dotnet/SeleniumDocs/BaseTest.cs @@ -17,7 +17,7 @@ public class BaseTest protected IWebDriver driver; protected Uri GridUrl; private Process _webserverProcess; - private const string ServerJarName = "selenium-server-4.26.0.jar"; + private const string ServerJarName = "selenium-server-4.27.0.jar"; private static readonly string BaseDirectory = AppContext.BaseDirectory; private const string RelativePathToGrid = "../../../../../"; private readonly string _examplesDirectory = Path.GetFullPath(Path.Combine(BaseDirectory, RelativePathToGrid)); diff --git a/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs b/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs index 15a50a9f6677..cbfdf48d4d45 100644 --- a/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs +++ b/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs @@ -4,8 +4,8 @@ using OpenQA.Selenium; using OpenQA.Selenium.DevTools; using System.Linq; -using OpenQA.Selenium.DevTools.V130.Network; -using OpenQA.Selenium.DevTools.V130.Performance; +using OpenQA.Selenium.DevTools.V131.Network; +using OpenQA.Selenium.DevTools.V131.Performance; namespace SeleniumDocs.BiDi.CDP @@ -16,7 +16,7 @@ public class NetworkTest : BaseTest [TestInitialize] public void Startup() { - StartDriver("130"); + StartDriver("131"); } [TestMethod] @@ -109,9 +109,9 @@ public async Task PerformanceMetrics() driver.Url = "https://www.selenium.dev/selenium/web/frameset.html"; var session = ((IDevTools)driver).GetDevToolsSession(); - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); - await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V13.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V131.Performance.EnableCommandSettings()); var metricsResponse = await session.SendCommand( new GetMetricsCommandSettings() @@ -130,8 +130,8 @@ await session.SendCommand( public async Task SetCookie() { var session = ((IDevTools)driver).GetDevToolsSession(); - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new OpenQA.Selenium.DevTools.V130.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new OpenQA.Selenium.DevTools.V131.Network.EnableCommandSettings()); var cookieCommandSettings = new SetCookieCommandSettings { diff --git a/examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs b/examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs index b5247b3a90c1..4e6975c5a04b 100644 --- a/examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs +++ b/examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs @@ -1,9 +1,101 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +using System; using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium; +using OpenQA.Selenium.Chrome; + +namespace SeleniumDocs.Interactions{ + +[TestClass] +public class CookiesTest{ + + WebDriver driver = new ChromeDriver(); + + [TestMethod] + public void addCookie(){ + driver.Url="https://www.selenium.dev/selenium/web/blank.html"; + // Add cookie into current browser context + driver.Manage().Cookies.AddCookie(new Cookie("key", "value")); + driver.Quit(); + } + + [TestMethod] + public void getNamedCookie(){ + driver.Url = "https://www.selenium.dev/selenium/web/blank.html"; + // Add cookie into current browser context + driver.Manage().Cookies.AddCookie(new Cookie("foo", "bar")); + // Get cookie details with named cookie 'foo' + Cookie cookie = driver.Manage().Cookies.GetCookieNamed("foo"); + Assert.AreEqual(cookie.Value, "bar"); + driver.Quit(); + } + + [TestMethod] + public void getAllCookies(){ + driver.Url = "https://www.selenium.dev/selenium/web/blank.html"; + // Add cookies into current browser context + driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); + driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); + // Get cookies + var cookies = driver.Manage().Cookies.AllCookies; + foreach (var cookie in cookies){ + if (cookie.Name.Equals("test1")){ + Assert.AreEqual("cookie1", cookie.Value); + } + if (cookie.Name.Equals("test2")){ + Assert.AreEqual("cookie2", cookie.Value); + } + } + driver.Quit(); + } + + [TestMethod] + public void deleteCookieNamed(){ + driver.Url = "https://www.selenium.dev/selenium/web/blank.html"; + driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); + // delete cookie named + driver.Manage().Cookies.DeleteCookieNamed("test1"); + driver.Quit(); + } -namespace SeleniumDocs.Interactions -{ - [TestClass] - public class CookiesTest : BaseTest - { + [TestMethod] + public void deleteCookieObject(){ + driver.Url = "https://www.selenium.dev/selenium/web/blank.html"; + Cookie cookie = new Cookie("test2", "cookie2"); + driver.Manage().Cookies.AddCookie(cookie); + /* + Selenium CSharp bindings also provides a way to delete + cookie by passing cookie object of current browsing context + */ + driver.Manage().Cookies.DeleteCookie(cookie); + driver.Quit(); + } + + [TestMethod] + public void deleteAllCookies(){ + driver.Url = "https://www.selenium.dev/selenium/web/blank.html"; + // Add cookies into current browser context + driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); + driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); + // Delete All cookies + driver.Manage().Cookies.DeleteAllCookies(); + driver.Quit(); + } } } \ No newline at end of file diff --git a/examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs b/examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs index 4bc479a025cd..927b34dff340 100644 --- a/examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs +++ b/examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs @@ -76,6 +76,15 @@ public void TestShrinkToFit() printOptions.ShrinkToFit = true; bool currentShrinkToFit = printOptions.ShrinkToFit; } - } + [TestMethod] + public void PrintWithPrintsPageTest() + { + WebDriver driver = new ChromeDriver(); + driver.Navigate().GoToUrl("https://www.selenium.dev/"); + PrintOptions printOptions = new PrintOptions(); + PrintDocument printedPage = driver.Print(printOptions); + Assert.IsTrue(printedPage.AsBase64EncodedString.StartsWith("JVBER")); + } + } } \ No newline at end of file diff --git a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj index 127b9fae75d3..25fdea77e910 100644 --- a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj +++ b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/examples/java/build.gradle b/examples/java/build.gradle index 4af7b30f997b..ec4fece1f95e 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -10,8 +10,8 @@ repositories { } dependencies { - testImplementation 'org.seleniumhq.selenium:selenium-java:4.26.0' - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.3' + testImplementation 'org.seleniumhq.selenium:selenium-java:4.27.0' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.4' } test { diff --git a/examples/java/gradle/wrapper/gradle-wrapper.properties b/examples/java/gradle/wrapper/gradle-wrapper.properties index df97d72b8b91..e2847c820046 100644 --- a/examples/java/gradle/wrapper/gradle-wrapper.properties +++ b/examples/java/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/examples/java/pom.xml b/examples/java/pom.xml index 5483e72d16f8..63259209cabd 100644 --- a/examples/java/pom.xml +++ b/examples/java/pom.xml @@ -10,10 +10,10 @@ 1 - 11 - 11 + 17 + 17 UTF-8 - 4.26.0 + 4.27.0 @@ -40,7 +40,7 @@ org.junit.jupiter junit-jupiter-engine - 5.11.3 + 5.11.4 test diff --git a/examples/java/src/test/java/dev/selenium/BaseTest.java b/examples/java/src/test/java/dev/selenium/BaseTest.java index 63ad5759d0e8..b12214c5a71b 100644 --- a/examples/java/src/test/java/dev/selenium/BaseTest.java +++ b/examples/java/src/test/java/dev/selenium/BaseTest.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.net.URL; import java.nio.file.Files; +import java.nio.file.Path; import java.time.Duration; import java.util.Arrays; import java.util.logging.Level; @@ -26,6 +27,9 @@ public class BaseTest { protected WebDriverWait wait; protected File driverPath; protected File browserPath; + protected String username = "admin"; + protected String password = "myStrongPassword"; + protected String trustStorePassword = "seleniumkeystore"; public WebElement getLocatedElement(WebDriver driver, By by) { WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5)); @@ -98,6 +102,38 @@ protected URL startStandaloneGrid() { } } + protected URL startStandaloneGridAdvanced() { + int port = PortProber.findFreePort(); + try { + System.setProperty("javax.net.ssl.trustStore", Path.of("src/test/resources/server.jks").toAbsolutePath().toString()); + System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword); + System.setProperty("jdk.internal.httpclient.disableHostnameVerification", "true"); + Main.main( + new String[] { + "standalone", + "--port", + String.valueOf(port), + "--selenium-manager", + "true", + "--enable-managed-downloads", + "true", + "--log-level", + "WARNING", + "--username", + username, + "--password", + password, + "--https-certificate", + Path.of("src/test/resources/tls.crt").toAbsolutePath().toString(), + "--https-private-key", + Path.of("src/test/resources/tls.key").toAbsolutePath().toString() + }); + return new URL("https://localhost:" + port); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + protected void enableLogging() { Logger logger = Logger.getLogger(""); logger.setLevel(Level.FINE); diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java index 73716b2fd6de..c2b039e759b7 100644 --- a/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java +++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java @@ -16,9 +16,9 @@ import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.HasDevTools; -import org.openqa.selenium.devtools.v128.browser.Browser; -import org.openqa.selenium.devtools.v128.network.Network; -import org.openqa.selenium.devtools.v128.network.model.Headers; +import org.openqa.selenium.devtools.v131.browser.Browser; +import org.openqa.selenium.devtools.v131.network.Network; +import org.openqa.selenium.devtools.v131.network.model.Headers; import org.openqa.selenium.support.ui.WebDriverWait; public class CdpApiTest extends BaseTest { @@ -27,7 +27,7 @@ public class CdpApiTest extends BaseTest { @BeforeEach public void createSession() { ChromeOptions options = new ChromeOptions(); - options.setBrowserVersion("128"); + options.setBrowserVersion("131"); driver = new ChromeDriver(options); wait = new WebDriverWait(driver, Duration.ofSeconds(10)); } diff --git a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java index bc35816059a5..d9fb6f454866 100644 --- a/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java +++ b/examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java @@ -21,10 +21,10 @@ import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.HasDevTools; import org.openqa.selenium.devtools.NetworkInterceptor; -import org.openqa.selenium.devtools.v128.browser.Browser; -import org.openqa.selenium.devtools.v128.network.Network; -import org.openqa.selenium.devtools.v128.performance.Performance; -import org.openqa.selenium.devtools.v128.performance.model.Metric; +import org.openqa.selenium.devtools.v131.browser.Browser; +import org.openqa.selenium.devtools.v131.network.Network; +import org.openqa.selenium.devtools.v131.performance.Performance; +import org.openqa.selenium.devtools.v131.performance.model.Metric; import org.openqa.selenium.remote.http.*; import org.openqa.selenium.support.ui.WebDriverWait; diff --git a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java index 19dd0f788132..11ccec612536 100644 --- a/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java +++ b/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java @@ -27,21 +27,6 @@ public void setup() { driver = new FirefoxDriver(options); } - @Test - public void jsErrors() { - CopyOnWriteArrayList logs = new CopyOnWriteArrayList<>(); - - try (LogInspector logInspector = new LogInspector(driver)) { - logInspector.onConsoleEntry(logs::add); - } - - driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); - driver.findElement(By.id("consoleLog")).click(); - - new WebDriverWait(driver, Duration.ofSeconds(5)).until(_d -> !logs.isEmpty()); - Assertions.assertEquals("Hello, world!", logs.get(0).getText()); - } - @Test void testListenToConsoleLog() throws ExecutionException, InterruptedException, TimeoutException { try (LogInspector logInspector = new LogInspector(driver)) { diff --git a/examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java b/examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java index a7a6e55ef7b7..e3363390b4b5 100644 --- a/examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java +++ b/examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java @@ -8,6 +8,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +import java.util.Map; import java.util.logging.Level; import java.util.regex.Pattern; import org.junit.jupiter.api.AfterEach; @@ -19,9 +20,8 @@ import org.openqa.selenium.chrome.ChromeDriverService; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.chromium.ChromiumDriverLogLevel; -import org.openqa.selenium.logging.LogEntries; -import org.openqa.selenium.logging.LogType; -import org.openqa.selenium.logging.LoggingPreferences; +import org.openqa.selenium.chromium.ChromiumNetworkConditions; +import org.openqa.selenium.logging.*; import org.openqa.selenium.remote.service.DriverFinder; @@ -180,4 +180,82 @@ private File getChromeLocation() { DriverFinder finder = new DriverFinder(ChromeDriverService.createDefaultService(), options); return new File(finder.getBrowserPath()); } + + @Test + public void setPermission() { + ChromeDriver driver = new ChromeDriver(); + driver.get("https://www.selenium.dev"); + + driver.setPermission("camera", "denied"); + + // Verify the permission state is 'denied' + String script = "return navigator.permissions.query({ name: 'camera' })" + + " .then(permissionStatus => permissionStatus.state);"; + String permissionState = (String) driver.executeScript(script); + + Assertions.assertEquals("denied", permissionState); + driver.quit(); + } + + @Test + public void setNetworkConditions() { + driver = new ChromeDriver(); + + ChromiumNetworkConditions networkConditions = new ChromiumNetworkConditions(); + networkConditions.setOffline(false); + networkConditions.setLatency(java.time.Duration.ofMillis(20)); // 20 ms of latency + networkConditions.setDownloadThroughput(2000 * 1024 / 8); // 2000 kbps + networkConditions.setUploadThroughput(2000 * 1024 / 8); // 2000 kbps + + ((ChromeDriver) driver).setNetworkConditions(networkConditions); + + driver.get("https://www.selenium.dev"); + + // Assert the network conditions are set as expected + ChromiumNetworkConditions actualConditions = ((ChromeDriver) driver).getNetworkConditions(); + Assertions.assertAll( + () -> Assertions.assertEquals(networkConditions.getOffline(), actualConditions.getOffline()), + () -> Assertions.assertEquals(networkConditions.getLatency(), actualConditions.getLatency()), + () -> Assertions.assertEquals(networkConditions.getDownloadThroughput(), actualConditions.getDownloadThroughput()), + () -> Assertions.assertEquals(networkConditions.getUploadThroughput(), actualConditions.getUploadThroughput()) + ); + ((ChromeDriver) driver).deleteNetworkConditions(); + driver.quit(); + } + + @Test + public void castFeatures() { + ChromeDriver driver = new ChromeDriver(); + + List> sinks = driver.getCastSinks(); + if (!sinks.isEmpty()) { + String sinkName = sinks.get(0).get("name"); + driver.startTabMirroring(sinkName); + driver.stopCasting(sinkName); + } + + driver.quit(); + } + + @Test + public void getBrowserLogs() { + ChromeDriver driver = new ChromeDriver(); + driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); + WebElement consoleLogButton = driver.findElement(By.id("consoleError")); + consoleLogButton.click(); + + LogEntries logs = driver.manage().logs().get(LogType.BROWSER); + + // Assert that at least one log contains the expected message + boolean logFound = false; + for (LogEntry log : logs) { + if (log.getMessage().contains("I am console error")) { + logFound = true; + break; + } + } + + Assertions.assertTrue(logFound, "No matching log message found."); + driver.quit(); + } } diff --git a/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java b/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java index 0711b26292cb..3925d763d71a 100644 --- a/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java +++ b/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java @@ -8,6 +8,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +import java.util.Map; import java.util.logging.Level; import java.util.regex.Pattern; import org.junit.jupiter.api.AfterEach; @@ -16,15 +17,15 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.chromium.ChromiumDriverLogLevel; +import org.openqa.selenium.chromium.ChromiumNetworkConditions; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.edge.EdgeDriverService; import org.openqa.selenium.edge.EdgeOptions; -import org.openqa.selenium.logging.LogEntries; -import org.openqa.selenium.logging.LogType; -import org.openqa.selenium.logging.LoggingPreferences; +import org.openqa.selenium.logging.*; import org.openqa.selenium.remote.service.DriverFinder; + public class EdgeTest extends BaseTest { @AfterEach public void clearProperties() { @@ -174,4 +175,82 @@ private File getEdgeLocation() { DriverFinder finder = new DriverFinder(EdgeDriverService.createDefaultService(), options); return new File(finder.getBrowserPath()); } + + @Test + public void setPermissions() { + EdgeDriver driver = new EdgeDriver(); + driver.get("https://www.selenium.dev"); + + driver.setPermission("camera", "denied"); + + // Verify the permission state is 'denied' + String script = "return navigator.permissions.query({ name: 'camera' })" + + " .then(permissionStatus => permissionStatus.state);"; + String permissionState = (String) driver.executeScript(script); + + Assertions.assertEquals("denied", permissionState); + driver.quit(); + } + + @Test + public void setNetworkConditions() { + driver = new EdgeDriver(); + + ChromiumNetworkConditions networkConditions = new ChromiumNetworkConditions(); + networkConditions.setOffline(false); + networkConditions.setLatency(java.time.Duration.ofMillis(20)); // 20 ms of latency + networkConditions.setDownloadThroughput(2000 * 1024 / 8); // 2000 kbps + networkConditions.setUploadThroughput(2000 * 1024 / 8); // 2000 kbps + + ((EdgeDriver) driver).setNetworkConditions(networkConditions); + + driver.get("https://www.selenium.dev"); + + // Assert the network conditions are set as expected + ChromiumNetworkConditions actualConditions = ((EdgeDriver) driver).getNetworkConditions(); + Assertions.assertAll( + () -> Assertions.assertEquals(networkConditions.getOffline(), actualConditions.getOffline()), + () -> Assertions.assertEquals(networkConditions.getLatency(), actualConditions.getLatency()), + () -> Assertions.assertEquals(networkConditions.getDownloadThroughput(), actualConditions.getDownloadThroughput()), + () -> Assertions.assertEquals(networkConditions.getUploadThroughput(), actualConditions.getUploadThroughput()) + ); + ((EdgeDriver) driver).deleteNetworkConditions(); + driver.quit(); + } + + @Test + public void castFeatures() { + EdgeDriver driver = new EdgeDriver(); + + List> sinks = driver.getCastSinks(); + if (!sinks.isEmpty()) { + String sinkName = sinks.get(0).get("name"); + driver.startTabMirroring(sinkName); + driver.stopCasting(sinkName); + } + + driver.quit(); + } + + @Test + public void getBrowserLogs() { + EdgeDriver driver = new EdgeDriver(); + driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); + WebElement consoleLogButton = driver.findElement(By.id("consoleError")); + consoleLogButton.click(); + + LogEntries logs = driver.manage().logs().get(LogType.BROWSER); + + // Assert that at least one log contains the expected message + boolean logFound = false; + for (LogEntry log : logs) { + if (log.getMessage().contains("I am console error")) { + logFound = true; + break; + } + } + + Assertions.assertTrue(logFound, "No matching log message found."); + driver.quit(); + } } diff --git a/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java b/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java index e763cd7824e1..28166e124804 100644 --- a/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java +++ b/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java @@ -13,14 +13,14 @@ import org.junit.jupiter.api.condition.DisabledOnOs; import org.junit.jupiter.api.condition.OS; import org.openqa.selenium.By; +import org.openqa.selenium.OutputType; import org.openqa.selenium.WebElement; -import org.openqa.selenium.firefox.FirefoxDriver; -import org.openqa.selenium.firefox.FirefoxDriverLogLevel; -import org.openqa.selenium.firefox.FirefoxDriverService; -import org.openqa.selenium.firefox.FirefoxOptions; -import org.openqa.selenium.firefox.GeckoDriverService; +import org.openqa.selenium.firefox.*; import org.openqa.selenium.remote.service.DriverFinder; -import org.junit.jupiter.api.Disabled; + + + + public class FirefoxTest extends BaseTest { private FirefoxDriver driver; @@ -124,8 +124,8 @@ public void setProfileLocation() { Assertions.assertTrue(location.contains(profileDirectory.getAbsolutePath())); } + @Test - @Disabled("Skipping tests until Firefox 127 is released") public void installAddon() { driver = startFirefoxDriver(); Path xpiPath = Paths.get("src/test/resources/extensions/selenium-example.xpi"); @@ -138,8 +138,8 @@ public void installAddon() { "Content injected by webextensions-selenium-example", injected.getText()); } + @Test - @Disabled("Skipping tests until Firefox 127 is released") public void uninstallAddon() { driver = startFirefoxDriver(); Path xpiPath = Paths.get("src/test/resources/extensions/selenium-example.xpi"); @@ -151,8 +151,8 @@ public void uninstallAddon() { Assertions.assertEquals(driver.findElements(By.id("webextensions-selenium-example")).size(), 0); } + @Test - @Disabled("Skipping tests until Firefox 127 is released") public void installUnsignedAddonPath() { driver = startFirefoxDriver(); Path path = Paths.get("src/test/resources/extensions/selenium-example"); @@ -171,4 +171,50 @@ private Path getFirefoxLocation() { DriverFinder finder = new DriverFinder(GeckoDriverService.createDefaultService(), options); return Path.of(finder.getBrowserPath()); } + + @Test + public void fullPageScreenshot() throws Exception { + driver = startFirefoxDriver(); + + driver.get("https://www.selenium.dev"); + + File screenshot = driver.getFullPageScreenshotAs(OutputType.FILE); + + File targetFile = new File("full_page_screenshot.png"); + Files.move(screenshot.toPath(), targetFile.toPath()); + + // Verify the screenshot file exists + Assertions.assertTrue(targetFile.exists(), "The full page screenshot file should exist"); + Files.deleteIfExists(targetFile.toPath()); + + driver.quit(); + } + + @Test + public void setContext() { + driver = startFirefoxDriver(); + + ((HasContext) driver).setContext(FirefoxCommandContext.CHROME); + driver.executeScript("console.log('Inside Chrome context');"); + + // Verify the context is back to "content" + Assertions.assertEquals( + FirefoxCommandContext.CHROME, ((HasContext) driver).getContext(), + "The context should be 'chrome'" + ); + + driver.quit(); + } + + @Test + public void firefoxProfile() { + FirefoxProfile profile = new FirefoxProfile(); + FirefoxOptions options = new FirefoxOptions(); + profile.setPreference("javascript.enabled", "False"); + options.setProfile(profile); + + driver = new FirefoxDriver(options); + + driver.quit(); + } } diff --git a/examples/java/src/test/java/dev/selenium/browsers/SafariTest.java b/examples/java/src/test/java/dev/selenium/browsers/SafariTest.java index 7e12aa362699..a579b2170e44 100644 --- a/examples/java/src/test/java/dev/selenium/browsers/SafariTest.java +++ b/examples/java/src/test/java/dev/selenium/browsers/SafariTest.java @@ -33,4 +33,10 @@ public void enableLogs() { driver = new SafariDriver(service); } + + public void safariTechnologyPreview() { + SafariOptions options = new SafariOptions(); + options.setUseTechnologyPreview(true); + driver = new SafariDriver(options); + } } diff --git a/examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java b/examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java index 2bf0923f6cbb..8304dba81dd6 100644 --- a/examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java +++ b/examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java @@ -2,6 +2,104 @@ import dev.selenium.BaseTest; +import org.openqa.selenium.remote.http.ClientConfig; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.remote.RemoteWebDriver; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; +import java.io.FileInputStream; +import java.net.URL; +import java.nio.file.Path; +import java.security.KeyStore; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.time.Duration; + +import org.openqa.selenium.UsernameAndPassword; + +import static java.net.http.HttpClient.Version.HTTP_1_1; + public class HttpClientTest extends BaseTest { + URL gridUrl; + + @BeforeEach + public void startGrid() { + gridUrl = startStandaloneGridAdvanced(); + } + + @Test + public void remoteWebDriverWithClientConfig() throws Exception { + ClientConfig clientConfig = ClientConfig.defaultConfig() + .withRetries() + .sslContext(createSSLContextWithCA(Path.of("src/test/resources/tls.crt").toAbsolutePath().toString())) + .connectionTimeout(Duration.ofSeconds(300)) + .readTimeout(Duration.ofSeconds(3600)) + .authenticateAs(new UsernameAndPassword("admin", "myStrongPassword")) + .version(HTTP_1_1.toString()); + ChromeOptions options = new ChromeOptions(); + options.setEnableDownloads(true); + driver = RemoteWebDriver.builder() + .oneOf(options) + .address(gridUrl) + .config(clientConfig) + .build(); + driver.quit(); + } + + @Test + public void remoteWebDriverIgnoreSSL() throws Exception { + ClientConfig clientConfig = ClientConfig.defaultConfig() + .withRetries() + .sslContext(createIgnoreSSLContext()) + .connectionTimeout(Duration.ofSeconds(300)) + .readTimeout(Duration.ofSeconds(3600)) + .authenticateAs(new UsernameAndPassword("admin", "myStrongPassword")) + .version(HTTP_1_1.toString()); + ChromeOptions options = new ChromeOptions(); + options.setEnableDownloads(true); + driver = RemoteWebDriver.builder() + .oneOf(options) + .address(gridUrl) + .config(clientConfig) + .build(); + driver.quit(); + } + + public static SSLContext createSSLContextWithCA(String caCertPath) throws Exception { + FileInputStream fis = new FileInputStream(caCertPath); + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + X509Certificate caCert = (X509Certificate) cf.generateCertificate(fis); + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, null); + keyStore.setCertificateEntry("caCert", caCert); + TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + tmf.init(keyStore); + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, tmf.getTrustManagers(), null); + return sslContext; + } + + public static SSLContext createIgnoreSSLContext() throws Exception { + TrustManager[] trustAllCerts = new TrustManager[]{ + new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } + } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, trustAllCerts, new java.security.SecureRandom()); + return sslContext; + } } diff --git a/examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java b/examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java index c8dfca72a7c2..9d07903ceef8 100644 --- a/examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java +++ b/examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java @@ -1,98 +1,109 @@ -package dev.selenium.interactions; +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. -import dev.selenium.BaseChromeTest; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; import org.openqa.selenium.Cookie; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; import java.util.Set; -public class CookiesTest extends BaseChromeTest { - @Test - public void addCookie() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - // Add cookie into current browser context - driver.manage().addCookie(new Cookie("key", "value")); - } finally { - driver.quit(); - } - } - @Test - public void getNamedCookie() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - // Add cookie into current browser context - driver.manage().addCookie(new Cookie("foo", "bar")); - // Get cookie details with named cookie 'foo' - Cookie cookie = driver.manage().getCookieNamed("foo"); - Assertions.assertEquals(cookie.getValue(), "bar"); - } finally { - driver.quit(); - } - } +public class CookiesTest { + + WebDriver driver = new ChromeDriver(); + @Test + public void addCookie() { + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + // Add cookie into current browser context + driver.manage().addCookie(new Cookie("key", "value")); + driver.quit(); + } + @Test + public void getNamedCookie() { + + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + // Add cookie into current browser context + driver.manage().addCookie(new Cookie("foo", "bar")); + // Get cookie details with named cookie 'foo' + Cookie cookie = driver.manage().getCookieNamed("foo"); + Assertions.assertEquals(cookie.getValue(), "bar"); + + driver.quit(); + } + - @Test - public void getAllCookies() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - // Add cookies into current browser context - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - // Get cookies - Set cookies = driver.manage().getCookies(); - for (Cookie cookie : cookies) { - if (cookie.getName().equals("test1")) { - Assertions.assertEquals(cookie.getValue(), "cookie1"); - } + @Test + public void getAllCookies() { + + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + // Add cookies into current browser context + driver.manage().addCookie(new Cookie("test1", "cookie1")); + driver.manage().addCookie(new Cookie("test2", "cookie2")); + // Get cookies + Set cookies = driver.manage().getCookies(); + for (Cookie cookie : cookies) { + if (cookie.getName().equals("test1")) { + Assertions.assertEquals(cookie.getValue(), "cookie1"); + } - if (cookie.getName().equals("test2")) { - Assertions.assertEquals(cookie.getValue(), "cookie2"); - } - } - } finally { - driver.quit(); - } - } + if (cookie.getName().equals("test2")) { + Assertions.assertEquals(cookie.getValue(), "cookie2"); + } + } + driver.quit(); + } + - @Test - public void deleteCookieNamed() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - // delete cookie named - driver.manage().deleteCookieNamed("test1"); - } finally { - driver.quit(); - } - } + @Test + public void deleteCookieNamed() { + + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + driver.manage().addCookie(new Cookie("test1", "cookie1")); + // delete cookie named + driver.manage().deleteCookieNamed("test1"); + driver.quit(); + } - @Test - public void deleteCookieObject() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - Cookie cookie = new Cookie("test2", "cookie2"); - driver.manage().addCookie(cookie); - /* - Selenium Java bindings also provides a way to delete - cookie by passing cookie object of current browsing context - */ - driver.manage().deleteCookie(cookie); - } finally { - driver.quit(); - } - } + @Test + public void deleteCookieObject() { + + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + Cookie cookie = new Cookie("test2", "cookie2"); + driver.manage().addCookie(cookie); + /* + Selenium Java bindings also provides a way to delete + cookie by passing cookie object of current browsing context + */ + driver.manage().deleteCookie(cookie); + + driver.quit(); + } + - @Test - public void deleteAllCookies() { - try { - driver.get("https://www.selenium.dev/selenium/web/blank.html"); - // Add cookies into current browser context - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - // Delete All cookies - driver.manage().deleteAllCookies(); - } finally { - driver.quit(); - } - } + @Test + public void deleteAllCookies() { + + driver.get("https://www.selenium.dev/selenium/web/blank.html"); + // Add cookies into current browser context + driver.manage().addCookie(new Cookie("test1", "cookie1")); + driver.manage().addCookie(new Cookie("test2", "cookie2")); + // Delete All cookies + driver.manage().deleteAllCookies(); + + driver.quit(); + } } diff --git a/examples/java/src/test/resources/server.jks b/examples/java/src/test/resources/server.jks new file mode 100644 index 000000000000..76579e1776c1 Binary files /dev/null and b/examples/java/src/test/resources/server.jks differ diff --git a/examples/java/src/test/resources/tls.crt b/examples/java/src/test/resources/tls.crt new file mode 100644 index 000000000000..58a511093dde --- /dev/null +++ b/examples/java/src/test/resources/tls.crt @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIIPgWI/2ppJPowDQYJKoZIhvcNAQELBQAwgYcxEDAOBgNV +BAYTB1Vua25vd24xEDAOBgNVBAgTB1Vua25vd24xEDAOBgNVBAcTB1Vua25vd24x +EzARBgNVBAoTClNlbGVuaXVtSFExJTAjBgNVBAsTHFNvZnR3YXJlIEZyZWVkb20g +Q29uc2VydmFuY3kxEzARBgNVBAMTClNlbGVuaXVtSFEwHhcNMjQxMTAzMDkwMDUz +WhcNMzQxMTAxMDkwMDUzWjCBhzEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMH +VW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjETMBEGA1UEChMKU2VsZW5pdW1IUTEl +MCMGA1UECxMcU29mdHdhcmUgRnJlZWRvbSBDb25zZXJ2YW5jeTETMBEGA1UEAxMK +U2VsZW5pdW1IUTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKVTx0e5 +6/75QgE5E6rTYPlTkIxDjZylOMT2YBNuB8vIFZkSaCtLEqto0XTVV6dQc8Ge41QV +rkt7DID1oN40rvWZdla9/2bVhCsWsRiXlvrKDbjoUi5kiLcfKJW+erUWs28xnLOw +bvGNLLAjEUitKKGpR1vsSMOuvMN9VnsSkn9smAHLT2y41CjKpvdkq+OCUdnqfYju +vV6OthRPXFMsDb1fYqZfE7fZhLc806Rg31qLssNVPwxt6VeNYi1/e5cWYeKIJQoj +sFkqIdvu7xHtR7Qu1tNdeQoiDhMS7VLdZDsnAAtQLHvyAVEBicBX95VrGnOTlKdk ++UDwyOP6djCISzUCAwEAAaNxMG8wHQYDVR0OBBYEFNrLCgZ7d2vfurWaJ4wa8O/T +PfXPME4GA1UdEQEB/wREMEKCCWxvY2FsaG9zdIITc2VsZW5pdW0tZ3JpZC5sb2Nh +bIISc2VsZW5pdW0tZ3JpZC5wcm9kggxzZWxlbml1bS5kZXYwDQYJKoZIhvcNAQEL +BQADggEBABtxoPrVrPO5ELzUuSXbvYKHQG9YEuoAisXsiOWmldXRRvT/yTr3nzJn +bC4dJywMW5unPdq1NoMxza0AF0KBFp1GzLDW5/KcA26R4IQi2xfQKVyRzb4vu0CY +BDbnzF7Bisj50sSI4WThtF4xLEHVmzJ2GWNp6SgAScIrdGeB320aTqUIDO8YHH+y +oeSu6qQfEcDiBWh3KD85vCIx0+L4AM3WKkP5nDq2FL6nwCdxqV7bo5/BZJEODMiW +xv/hw0r1OBn2T2Z6o3pRI92zu9sjj6PzPP80DUPl7+fqAaRlLFglXd8b+Qxojm9o +B0QN+gEM717L6WqmJGr1VC6HWQCvcCc= +-----END CERTIFICATE----- diff --git a/examples/java/src/test/resources/tls.key b/examples/java/src/test/resources/tls.key new file mode 100644 index 000000000000..d97038cd2ef8 --- /dev/null +++ b/examples/java/src/test/resources/tls.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQClU8dHuev++UIB +OROq02D5U5CMQ42cpTjE9mATbgfLyBWZEmgrSxKraNF01VenUHPBnuNUFa5LewyA +9aDeNK71mXZWvf9m1YQrFrEYl5b6yg246FIuZIi3HyiVvnq1FrNvMZyzsG7xjSyw +IxFIrSihqUdb7EjDrrzDfVZ7EpJ/bJgBy09suNQoyqb3ZKvjglHZ6n2I7r1ejrYU +T1xTLA29X2KmXxO32YS3PNOkYN9ai7LDVT8MbelXjWItf3uXFmHiiCUKI7BZKiHb +7u8R7Ue0LtbTXXkKIg4TEu1S3WQ7JwALUCx78gFRAYnAV/eVaxpzk5SnZPlA8Mjj ++nYwiEs1AgMBAAECggEAA2D+tT3SGlmG9Tube2CLaRUW4shSVDBWmcSXn+teBUFv +MDwdfRMGoZJdw4eaXWz0wgaItV7QZjJbMKXfK44ZQaOTtP/4QLuzkjuKE4tXloO7 +e5BjS5eaPrSIPGU9S0cDPvjH2oP22dYi4sJYt6ry+2ODC0Mn6o3p8Dc3Ja1HvrXA +SNImimok7YemXVMbdPyaqbu2eXjPvWAA8W9/OW2L1n4U4neM0S5Nt3tVl5sMELj5 +iFC7Z+M3ZLon/54137h3xPmHYQMiPIX+PulaRLOJYSbR0dtMHhPMyWtR7GwEK4Aw +EgtDLKfa6qMv5BYsI2E0bPHRDaj39UXGeWX5/2xzyQKBgQDcMUL3sEbRmeBKhYlT +xv5ea2P4P247DDWObTDw5jLhwfmOycFcJVlaiXICpGR6hqWY8wI7kKxbQQVKFob6 +JVpIHmkkRqsV8JfXVAcaH1thlKAS4NVZsOJIVBHO3JdPaCUFq7HHbBA3436aJLtC +HiINkuiNXd2dDMuDwOsfhsRFzQKBgQDANnK1P7sZSP7dJHinA2sPSbGAK8ZTbYWD +8oe/lYlLkw6qM9i8vIKCfTpfi4vh4qfjQUczdy1w2zFbxriC2+uxhEqDN2tud3/P +0CYrO0SGQKYCROrYUh0Pl1MswBeu8yT5AdrIBK3t92wfYqTWK7VUZQaUQ7YJWfXS +usbz5qIzCQKBgH8ICHt+/gxUOtqjWYu0pPFyATWp2n1EWO13PyHrnHU0BDaFXQE9 +JuSdoOG3V6R8Y7Lul14n49etllCc2Hgd7ozmxn/AKVm5+M+oUYSXjI+qQANEJLHe +410Y60EtcDnGen1gBWtog57KpzJkeIf3fGvaUkGkYoMFa6/yL3N7u2YNAoGADH29 +WKAKpasDvRVYrenf9D9ixKSTn+pXKesB/WZXZMzqwA7cf+90P8yplXn5HjXfmTot +yV9uWY41F/TDGuX13DRvrzVTyvsDGFs7j8WrP1pGL5GQ/XvgnZnE8vyMzXbJqVEA +ic0cDIHuyd9cPPrcLt7d3ZbE5ris7APtV/5d/hkCgYAMFCYoKcCh+9/2HOgwQ1b6 +16CS71TvDBCx7+D1V3WXrIOWkNzW2SIZtnhQwglU9L7PFw6ViJAY4sB2p9hDDtcZ +e7Lotmnbrb75QQpWUyaoZMsw8l23MOGPzHKPqNiT57uOorjcFrePi9EOdERSG9+4 +lRKqCFhaNBUwQ4idzO0rWA== +-----END PRIVATE KEY----- diff --git a/examples/javascript/package-lock.json b/examples/javascript/package-lock.json index 19e819966834..a81d7b554c79 100644 --- a/examples/javascript/package-lock.json +++ b/examples/javascript/package-lock.json @@ -10,10 +10,10 @@ "license": "Apache-2.0", "dependencies": { "assert": "2.1.0", - "selenium-webdriver": "4.26.0" + "selenium-webdriver": "4.27.0" }, "devDependencies": { - "mocha": "10.8.2" + "mocha": "11.0.1" } }, "node_modules/@bazel/runfiles": { @@ -22,6 +22,112 @@ "integrity": "sha512-1uLNT5NZsUVIGS4syuHwTzZ8HycMPyr6POA3FCE4GbMtc4rhoJk8aZKtNIRthJYfL+iioppi+rTfH3olMPr9nA==", "license": "Apache-2.0" }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -254,6 +360,20 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", @@ -321,6 +441,12 @@ "node": ">=0.3.1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -394,11 +520,21 @@ "is-callable": "^1.1.3" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/fsevents": { "version": "2.3.2", @@ -446,19 +582,20 @@ } }, "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": ">=12" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -476,6 +613,21 @@ "node": ">= 6" } }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -568,16 +720,6 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -734,6 +876,27 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -796,6 +959,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -808,12 +977,20 @@ "node": ">=10" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", + "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", @@ -822,7 +999,7 @@ "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", - "glob": "^8.1.0", + "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", @@ -841,7 +1018,7 @@ "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 14.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/mocha/node_modules/ms": { @@ -905,15 +1082,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -944,6 +1112,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -958,6 +1132,31 @@ "node": ">=8" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1025,9 +1224,19 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/selenium-webdriver": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.26.0.tgz", - "integrity": "sha512-nA7jMRIPV17mJmAiTDBWN96Sy0Uxrz5CCLb7bLVV6PpL417SyBMPc2Zo/uoREc2EOHlzHwHwAlFtgmSngSY4WQ==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.27.0.tgz", + "integrity": "sha512-LkTJrNz5socxpPnWPODQ2bQ65eYx9JK+DQMYNihpTjMCqHwgWGYQnQTCAAche2W3ZP87alA+1zYPvgS8tHNzMQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/SeleniumHQ" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/selenium" + } + ], "license": "Apache-2.0", "dependencies": { "@bazel/runfiles": "^6.3.1", @@ -1067,6 +1276,39 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1089,6 +1331,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1101,6 +1358,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -1166,6 +1436,21 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/which-typed-array": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", @@ -1208,11 +1493,23 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } }, "node_modules/ws": { "version": "8.18.0", @@ -1304,6 +1601,78 @@ "resolved": "https://registry.npmjs.org/@bazel/runfiles/-/runfiles-6.3.1.tgz", "integrity": "sha512-1uLNT5NZsUVIGS4syuHwTzZ8HycMPyr6POA3FCE4GbMtc4rhoJk8aZKtNIRthJYfL+iioppi+rTfH3olMPr9nA==" }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -1478,6 +1847,17 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", @@ -1519,6 +1899,12 @@ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1570,11 +1956,15 @@ "is-callable": "^1.1.3" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } }, "fsevents": { "version": "2.3.2", @@ -1606,16 +1996,28 @@ } }, "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "dependencies": { + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "glob-parent": { @@ -1686,16 +2088,6 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -1797,6 +2189,22 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1844,6 +2252,12 @@ "is-unicode-supported": "^0.1.0" } }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -1853,10 +2267,16 @@ "brace-expansion": "^2.0.1" } }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", + "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, "requires": { "ansi-colors": "^4.1.3", @@ -1866,7 +2286,7 @@ "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", - "glob": "^8.1.0", + "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", @@ -1926,15 +2346,6 @@ "object-keys": "^1.1.1" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1953,6 +2364,12 @@ "p-limit": "^3.0.2" } }, + "package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -1964,6 +2381,22 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + } + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2019,9 +2452,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "selenium-webdriver": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.26.0.tgz", - "integrity": "sha512-nA7jMRIPV17mJmAiTDBWN96Sy0Uxrz5CCLb7bLVV6PpL417SyBMPc2Zo/uoREc2EOHlzHwHwAlFtgmSngSY4WQ==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.27.0.tgz", + "integrity": "sha512-LkTJrNz5socxpPnWPODQ2bQ65eYx9JK+DQMYNihpTjMCqHwgWGYQnQTCAAche2W3ZP87alA+1zYPvgS8tHNzMQ==", "requires": { "@bazel/runfiles": "^6.3.1", "jszip": "^3.10.1", @@ -2054,6 +2487,27 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -2073,6 +2527,17 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2082,6 +2547,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2128,6 +2602,15 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "which-typed-array": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", @@ -2158,11 +2641,16 @@ "strip-ansi": "^6.0.0" } }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } }, "ws": { "version": "8.18.0", diff --git a/examples/javascript/package.json b/examples/javascript/package.json index e99f6226ce59..1e4e31ade68b 100644 --- a/examples/javascript/package.json +++ b/examples/javascript/package.json @@ -8,9 +8,9 @@ "license": "Apache-2.0", "dependencies": { "assert": "2.1.0", - "selenium-webdriver": "4.26.0" + "selenium-webdriver": "4.27.0" }, "devDependencies": { - "mocha": "10.8.2" + "mocha": "11.0.1" } } diff --git a/examples/javascript/test/browser/chromeSpecificCaps.spec.js b/examples/javascript/test/browser/chromeSpecificCaps.spec.js index 813636cb15a2..04175656d870 100644 --- a/examples/javascript/test/browser/chromeSpecificCaps.spec.js +++ b/examples/javascript/test/browser/chromeSpecificCaps.spec.js @@ -2,6 +2,8 @@ const Chrome = require('selenium-webdriver/chrome'); const { Browser, Builder } = require("selenium-webdriver"); const options = new Chrome.Options(); + + describe('Should be able to Test Command line arguments', function () { it('headless', async function () { let driver = new Builder() diff --git a/examples/javascript/test/browser/edgeSpecificCaps.spec.js b/examples/javascript/test/browser/edgeSpecificCaps.spec.js index 23fad7888f19..4f059f5c79a5 100644 --- a/examples/javascript/test/browser/edgeSpecificCaps.spec.js +++ b/examples/javascript/test/browser/edgeSpecificCaps.spec.js @@ -4,6 +4,7 @@ const options = new edge.Options(); const assert = require("assert"); + describe('Should be able to Test Command line arguments', function () { it('headless', async function () { let driver = new Builder() diff --git a/examples/javascript/test/getting_started/openEdgeTest.spec.js b/examples/javascript/test/getting_started/openEdgeTest.spec.js index f7cc5078924d..001337c356ec 100644 --- a/examples/javascript/test/getting_started/openEdgeTest.spec.js +++ b/examples/javascript/test/getting_started/openEdgeTest.spec.js @@ -5,6 +5,8 @@ const edge = require('selenium-webdriver/edge'); describe('Open Edge', function () { let driver; + + before(async function () { let options = new edge.Options(); driver = new Builder() diff --git a/examples/kotlin/pom.xml b/examples/kotlin/pom.xml index a6ea1769b093..79ea866e648a 100644 --- a/examples/kotlin/pom.xml +++ b/examples/kotlin/pom.xml @@ -12,15 +12,15 @@ 2.0.21 2.0.16 - 1.5.12 + 1.5.14 - 5.11.3 + 5.11.4 5.2.3 3.5.2 1.8 - 4.26.0 + 4.27.0 ${java.version} ${java.version} diff --git a/examples/python/README.md b/examples/python/README.md index f0aaefb2f8fb..2db5f25cb9a5 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -32,7 +32,7 @@ pytest ## Execute a specific example To run a specific Selenium Python example, use the following command: ```bash -python first_script.py +pytest path/to/test_script.py ``` -Make sure to replace `first_script.py` with the path and name of the example you want to run. +Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run. \ No newline at end of file diff --git a/examples/python/requirements.txt b/examples/python/requirements.txt index 234f278f9e4b..42a3902ce8d9 100644 --- a/examples/python/requirements.txt +++ b/examples/python/requirements.txt @@ -1,5 +1,7 @@ -selenium==4.26.1 +selenium==4.27.1 pytest trio pytest-trio +pytest-rerunfailures flake8 +requests diff --git a/examples/python/tests/actions_api/test_mouse.py b/examples/python/tests/actions_api/test_mouse.py index cc114389ccf4..9df04fd599f7 100644 --- a/examples/python/tests/actions_api/test_mouse.py +++ b/examples/python/tests/actions_api/test_mouse.py @@ -1,17 +1,19 @@ +import pytest from time import sleep - from selenium.webdriver import ActionChains from selenium.webdriver.common.actions.action_builder import ActionBuilder from selenium.webdriver.common.actions.mouse_button import MouseButton from selenium.webdriver.common.by import By +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC def test_click_and_hold(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') clickable = driver.find_element(By.ID, "clickable") - ActionChains(driver)\ - .click_and_hold(clickable)\ + ActionChains(driver) \ + .click_and_hold(clickable) \ .perform() sleep(0.5) @@ -22,8 +24,8 @@ def test_click_and_release(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') clickable = driver.find_element(By.ID, "click") - ActionChains(driver)\ - .click(clickable)\ + ActionChains(driver) \ + .click(clickable) \ .perform() assert "resultPage.html" in driver.current_url @@ -33,8 +35,8 @@ def test_right_click(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') clickable = driver.find_element(By.ID, "clickable") - ActionChains(driver)\ - .context_click(clickable)\ + ActionChains(driver) \ + .context_click(clickable) \ .perform() sleep(0.5) @@ -72,8 +74,8 @@ def test_double_click(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') clickable = driver.find_element(By.ID, "clickable") - ActionChains(driver)\ - .double_click(clickable)\ + ActionChains(driver) \ + .double_click(clickable) \ .perform() assert driver.find_element(By.ID, "click-status").text == "double-clicked" @@ -83,8 +85,8 @@ def test_hover(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') hoverable = driver.find_element(By.ID, "hover") - ActionChains(driver)\ - .move_to_element(hoverable)\ + ActionChains(driver) \ + .move_to_element(hoverable) \ .perform() assert driver.find_element(By.ID, "move-status").text == "hovered" @@ -94,8 +96,8 @@ def test_move_by_offset_from_element(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') mouse_tracker = driver.find_element(By.ID, "mouse-tracker") - ActionChains(driver)\ - .move_to_element_with_offset(mouse_tracker, 8, 0)\ + ActionChains(driver) \ + .move_to_element_with_offset(mouse_tracker, 8, 0) \ .perform() coordinates = driver.find_element(By.ID, "relative-location").text.split(", ") @@ -104,7 +106,7 @@ def test_move_by_offset_from_element(driver): def test_move_by_offset_from_viewport_origin_ab(driver): driver.get('https://selenium.dev/selenium/web/mouse_interaction.html') - + WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "absolute-location"))) action = ActionBuilder(driver) action.pointer_action.move_to_location(8, 0) action.perform() @@ -121,8 +123,8 @@ def test_move_by_offset_from_current_pointer_ab(driver): action.pointer_action.move_to_location(6, 3) action.perform() - ActionChains(driver)\ - .move_by_offset( 13, 15)\ + ActionChains(driver) \ + .move_by_offset(13, 15) \ .perform() coordinates = driver.find_element(By.ID, "absolute-location").text.split(", ") @@ -136,8 +138,8 @@ def test_drag_and_drop_onto_element(driver): draggable = driver.find_element(By.ID, "draggable") droppable = driver.find_element(By.ID, "droppable") - ActionChains(driver)\ - .drag_and_drop(draggable, droppable)\ + ActionChains(driver) \ + .drag_and_drop(draggable, droppable) \ .perform() assert driver.find_element(By.ID, "drop-status").text == "dropped" @@ -149,15 +151,8 @@ def test_drag_and_drop_by_offset(driver): draggable = driver.find_element(By.ID, "draggable") start = draggable.location finish = driver.find_element(By.ID, "droppable").location - ActionChains(driver)\ - .drag_and_drop_by_offset(draggable, finish['x'] - start['x'], finish['y'] - start['y'])\ + ActionChains(driver) \ + .drag_and_drop_by_offset(draggable, finish['x'] - start['x'], finish['y'] - start['y']) \ .perform() assert driver.find_element(By.ID, "drop-status").text == "dropped" - - - - - - - diff --git a/examples/python/tests/bidi/cdp/test_network.py b/examples/python/tests/bidi/cdp/test_network.py index 676d0c75aea9..191d7a4a95ad 100644 --- a/examples/python/tests/bidi/cdp/test_network.py +++ b/examples/python/tests/bidi/cdp/test_network.py @@ -2,7 +2,7 @@ import pytest from selenium.webdriver.common.by import By -from selenium.webdriver.common.devtools.v128.network import Headers +from selenium.webdriver.common.devtools.v131.network import Headers @pytest.mark.trio diff --git a/examples/python/tests/bidi/cdp/test_script.py b/examples/python/tests/bidi/cdp/test_script.py index c547de1d25da..9c837c75e227 100644 --- a/examples/python/tests/bidi/cdp/test_script.py +++ b/examples/python/tests/bidi/cdp/test_script.py @@ -1,13 +1,16 @@ import pytest +import trio from selenium.webdriver.common.by import By from selenium.webdriver.common.log import Log - +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC @pytest.mark.trio async def test_mutation(driver): async with driver.bidi_connection() as session: async with Log(driver, session).mutation_events() as event: - driver.get('https://www.selenium.dev/selenium/web/dynamic.html') - driver.find_element(By.ID, "reveal").click() + await trio.to_thread.run_sync(lambda: driver.get('https://www.selenium.dev/selenium/web/dynamic.html')) + await trio.to_thread.run_sync(lambda: WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "reveal")))) + await trio.to_thread.run_sync(lambda: driver.find_element(By.ID, "reveal").click()) assert event["element"] == driver.find_element(By.ID, "revealed") diff --git a/examples/python/tests/browsers/test_chrome.py b/examples/python/tests/browsers/test_chrome.py index 5bf81e3fca26..3f72785d4077 100644 --- a/examples/python/tests/browsers/test_chrome.py +++ b/examples/python/tests/browsers/test_chrome.py @@ -1,9 +1,9 @@ import os import re import subprocess - +import pytest from selenium import webdriver - +from selenium.webdriver.common.by import By def test_basic_options(): options = webdriver.ChromeOptions() @@ -121,3 +121,70 @@ def test_build_checks(capfd): assert expected in err driver.quit() + + +def test_set_network_conditions(): + driver = webdriver.Chrome() + + network_conditions = { + "offline": False, + "latency": 20, # 20 ms of latency + "download_throughput": 2000 * 1024 / 8, # 2000 kbps + "upload_throughput": 2000 * 1024 / 8, # 2000 kbps + } + driver.set_network_conditions(**network_conditions) + + driver.get("https://www.selenium.dev") + + # check whether the network conditions are set + assert driver.get_network_conditions() == network_conditions + + driver.quit() + + +def test_set_permissions(): + driver = webdriver.Chrome() + driver.get('https://www.selenium.dev') + + driver.set_permissions('camera', 'denied') + + assert get_permission_state(driver, 'camera') == 'denied' + driver.quit() + + +def get_permission_state(driver, name): + """Helper function to query the permission state.""" + script = """ + const callback = arguments[arguments.length - 1]; + navigator.permissions.query({name: arguments[0]}).then(permissionStatus => { + callback(permissionStatus.state); + }); + """ + return driver.execute_async_script(script, name) + + +def test_cast_features(): + driver = webdriver.Chrome() + + try: + sinks = driver.get_sinks() + if sinks: + sink_name = sinks[0]['name'] + driver.start_tab_mirroring(sink_name) + driver.stop_casting(sink_name) + else: + pytest.skip("No available Cast sinks to test with.") + finally: + driver.quit() + + +def test_get_browser_logs(): + driver = webdriver.Chrome() + driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html") + driver.find_element(By.ID, "consoleError").click() + + logs = driver.get_log("browser") + + # Assert that at least one log contains the expected message + assert any("I am console error" in log['message'] for log in logs), "No matching log message found." + driver.quit() diff --git a/examples/python/tests/browsers/test_edge.py b/examples/python/tests/browsers/test_edge.py index ac0224ebd66c..7a368fb5a04d 100644 --- a/examples/python/tests/browsers/test_edge.py +++ b/examples/python/tests/browsers/test_edge.py @@ -1,9 +1,9 @@ import os import re import subprocess - +import pytest from selenium import webdriver - +from selenium.webdriver.common.by import By def test_basic_options(): options = webdriver.EdgeOptions() @@ -122,3 +122,69 @@ def test_build_checks(log_path): driver.quit() + +def test_set_network_conditions(): + driver = webdriver.Edge() + + network_conditions = { + "offline": False, + "latency": 20, # 20 ms of latency + "download_throughput": 2000 * 1024 / 8, # 2000 kbps + "upload_throughput": 2000 * 1024 / 8, # 2000 kbps + } + driver.set_network_conditions(**network_conditions) + + driver.get("https://www.selenium.dev") + + # check whether the network conditions are set + assert driver.get_network_conditions() == network_conditions + + driver.quit() + + +def test_set_permissions(): + driver = webdriver.Edge() + driver.get('https://www.selenium.dev') + + driver.set_permissions('camera', 'denied') + + assert get_permission_state(driver, 'camera') == 'denied' + driver.quit() + + +def get_permission_state(driver, name): + """Helper function to query the permission state.""" + script = """ + const callback = arguments[arguments.length - 1]; + navigator.permissions.query({name: arguments[0]}).then(permissionStatus => { + callback(permissionStatus.state); + }); + """ + return driver.execute_async_script(script, name) + + +def test_cast_features(): + driver = webdriver.Edge() + + try: + sinks = driver.get_sinks() + if sinks: + sink_name = sinks[0]['name'] + driver.start_tab_mirroring(sink_name) + driver.stop_casting(sink_name) + else: + pytest.skip("No available Cast sinks to test with.") + finally: + driver.quit() + + +def test_get_browser_logs(): + driver = webdriver.Edge() + driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html") + driver.find_element(By.ID, "consoleError").click() + + logs = driver.get_log("browser") + + # Assert that at least one log contains the expected message + assert any("I am console error" in log['message'] for log in logs), "No matching log message found." + driver.quit() diff --git a/examples/python/tests/browsers/test_firefox.py b/examples/python/tests/browsers/test_firefox.py index 4f0ae0a382fb..5780e16106fd 100644 --- a/examples/python/tests/browsers/test_firefox.py +++ b/examples/python/tests/browsers/test_firefox.py @@ -129,3 +129,39 @@ def test_install_unsigned_addon_directory_slash(firefox_driver, addon_path_dir_s injected = driver.find_element(webdriver.common.by.By.ID, "webextensions-selenium-example") assert injected.text == "Content injected by webextensions-selenium-example" + + +def test_full_page_screenshot(firefox_driver): + driver = firefox_driver + + driver.get("https://www.selenium.dev") + + driver.save_full_page_screenshot("full_page_screenshot.png") + + assert os.path.exists("full_page_screenshot.png") + + driver.quit() + + +def test_set_context(firefox_driver): + driver = firefox_driver + + with driver.context(driver.CONTEXT_CHROME): + driver.execute_script("console.log('Inside Chrome context');") + + # Check if the context is back to content + assert driver.execute("GET_CONTEXT")["value"] == "content" + + +def test_firefox_profile(): + from selenium.webdriver.firefox.options import Options + from selenium.webdriver.firefox.firefox_profile import FirefoxProfile + + options = Options() + firefox_profile = FirefoxProfile() + firefox_profile.set_preference("javascript.enabled", False) + options.profile = firefox_profile + + driver = webdriver.Firefox(options=options) + + driver.quit() diff --git a/examples/python/tests/browsers/test_internet_explorer.py b/examples/python/tests/browsers/test_internet_explorer.py index c3efd343cdf6..617222e4ab30 100644 --- a/examples/python/tests/browsers/test_internet_explorer.py +++ b/examples/python/tests/browsers/test_internet_explorer.py @@ -23,14 +23,82 @@ def test_basic_options_win11(): driver.quit() +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_file_upload_timeout(): + options = webdriver.IeOptions() + options.file_upload_timeout = 2000 + + driver = webdriver.Ie(options=options) + + driver.quit() + + +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_ensure_clean_session(): + options = webdriver.IeOptions() + options.ensure_clean_session = True + + driver = webdriver.Ie(options=options) + + driver.quit() + + +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_ignore_zoom_level(): + options = webdriver.IeOptions() + options.ignore_zoom_level = True + + driver = webdriver.Ie(options=options) + + driver.quit() + + +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_ignore_protected_mode_settings(): + options = webdriver.IeOptions() + options.ignore_protected_mode_settings = True + + driver = webdriver.Ie(options=options) + + driver.quit() + + +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_silent(): + service = webdriver.IeService(service_args=["--silent"]) + driver = webdriver.Ie(service=service) + + driver.quit() + + +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") +def test_cmd_options(): + options = webdriver.IeOptions() + options.add_argument("-private") + + driver = webdriver.Ie(options=options) + + driver.quit() + +# Skipping this as it fails on Windows because the value of registry setting in +# HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0' +@pytest.mark.skip +def test_force_create_process_api(): + options = webdriver.IeOptions() + options.force_create_process_api = True + + driver = webdriver.Ie(options=options) + + driver.quit() + @pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") def test_log_to_file(log_path): - service = webdriver.IeService(log_output=log_path, log_level='INFO') + service = webdriver.IeService(log_output=log_path, log_level="INFO") driver = webdriver.Ie(service=service) - with open(log_path, 'r') as fp: + with open(log_path, "r") as fp: assert "Starting WebDriver server" in fp.readline() driver.quit() @@ -50,19 +118,19 @@ def test_log_to_stdout(capfd): @pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") def test_log_level(log_path): - service = webdriver.IeService(log_output=log_path, log_level='WARN') + service = webdriver.IeService(log_output=log_path, log_level="WARN") driver = webdriver.Ie(service=service) - with open(log_path, 'r') as fp: - assert 'Started InternetExplorerDriver server (32-bit)' in fp.readline() + with open(log_path, "r") as fp: + assert "Started InternetExplorerDriver server (32-bit)" in fp.readline() driver.quit() @pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") def test_supporting_files(temp_dir): - service = webdriver.IeService(service_args=["–extract-path="+temp_dir]) + service = webdriver.IeService(service_args=["–extract-path=" + temp_dir]) driver = webdriver.Ie(service=service) diff --git a/examples/python/tests/conftest.py b/examples/python/tests/conftest.py index fde953af0608..caf63c070ea3 100644 --- a/examples/python/tests/conftest.py +++ b/examples/python/tests/conftest.py @@ -7,6 +7,8 @@ from selenium.webdriver.common.utils import free_port from datetime import datetime from urllib.request import urlopen +import requests +from requests.auth import HTTPBasicAuth import pytest from selenium import webdriver @@ -140,7 +142,7 @@ def server_old(request): os.path.abspath(__file__) ) ), - "selenium-server-4.26.0.jar", + "selenium-server-4.27.0.jar", ) def wait_for_server(url, timeout): @@ -198,7 +200,7 @@ def server(): ) ) ), - "selenium-server-4.26.0.jar", + "selenium-server-4.27.0.jar", ) args = [ @@ -236,3 +238,88 @@ def wait_for_server(url, timeout=60): process.wait(timeout=10) except subprocess.TimeoutExpired: process.kill() + + +def _get_resource_path(file_name: str): + if os.path.abspath("").endswith("tests"): + path = os.path.abspath(f"resources/{file_name}") + else: + path = os.path.join( + os.path.dirname( + os.path.dirname( + os.path.abspath(__file__) + ) + ), + f"tests/resources/{file_name}", + ) + return path + + +@pytest.fixture(scope="function") +def grid_server(): + _host = "localhost" + _port = free_port() + _username = "admin" + _password = "myStrongPassword" + _path_cert = _get_resource_path("tls.crt") + _path_key = _get_resource_path("tls.key") + _path_jks = _get_resource_path("server.jks") + _truststore_pass = "seleniumkeystore" + _path = os.path.join( + os.path.dirname( + os.path.dirname( + os.path.dirname( + os.path.abspath(__file__) + ) + ) + ), + "selenium-server-4.27.0.jar", + ) + + args = [ + "java", + f"-Djavax.net.ssl.trustStore={_path_jks}", + f"-Djavax.net.ssl.trustStorePassword={_truststore_pass}", + "-Djdk.internal.httpclient.disableHostnameVerification=true", + "-jar", + _path, + "standalone", + "--port", + str(_port), + "--selenium-manager", + "true", + "--enable-managed-downloads", + "true", + "--username", + _username, + "--password", + _password, + "--https-certificate", + _path_cert, + "--https-private-key", + _path_key, + ] + + process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + def wait_for_server(url, timeout=60): + start = time.time() + while time.time() - start < timeout: + try: + requests.get(url, verify=_path_cert, auth=HTTPBasicAuth(_username, _password)) + return True + except OSError as e: + print(e) + time.sleep(0.2) + return False + + if not wait_for_server(f"https://{_host}:{_port}/status"): + raise RuntimeError(f"Selenium server did not start within the allotted time.") + + yield f"https://{_host}:{_port}" + + process.terminate() + try: + process.wait(timeout=10) + except subprocess.TimeoutExpired: + process.kill() diff --git a/examples/python/tests/drivers/test_http_client.py b/examples/python/tests/drivers/test_http_client.py index 53b695b6fc83..6e0ffa021d6e 100644 --- a/examples/python/tests/drivers/test_http_client.py +++ b/examples/python/tests/drivers/test_http_client.py @@ -1,2 +1,47 @@ +import os +import pytest +import sys +from urllib3.util import Retry, Timeout from selenium import webdriver +from selenium.webdriver.common.proxy import Proxy +from selenium.webdriver.common.proxy import ProxyType +from selenium.webdriver.remote.client_config import ClientConfig + +@pytest.mark.skipif(sys.platform == "win32", reason="Gets stuck on Windows, passes locally") +def test_start_remote_with_client_config(grid_server): + proxy = Proxy({"proxyType": ProxyType.AUTODETECT}) + retries = Retry(connect=2, read=2, redirect=2) + timeout = Timeout(connect=300, read=3600) + client_config = ClientConfig(remote_server_addr=grid_server, + proxy=proxy, + init_args_for_pool_manager={ + "init_args_for_pool_manager": {"retries": retries, "timeout": timeout}}, + ca_certs=_get_resource_path("tls.crt"), + username="admin", password="myStrongPassword") + options = webdriver.ChromeOptions() + driver = webdriver.Remote(command_executor=grid_server, options=options, client_config=client_config) + driver.get("https://www.selenium.dev") + driver.quit() + + +@pytest.mark.skipif(sys.platform == "win32", reason="Gets stuck on Windows, passes locally") +def test_start_remote_ignore_certs(grid_server): + proxy = Proxy({"proxyType": ProxyType.AUTODETECT}) + client_config = ClientConfig(remote_server_addr=grid_server, + proxy=proxy, + timeout=3600, + ignore_certificates=True, + username="admin", password="myStrongPassword") + options = webdriver.ChromeOptions() + driver = webdriver.Remote(command_executor=grid_server, options=options, client_config=client_config) + driver.get("https://www.selenium.dev") + driver.quit() + + +def _get_resource_path(file_name: str): + if os.path.abspath("").endswith("tests"): + path = os.path.abspath(f"resources/{file_name}") + else: + path = os.path.abspath(f"tests/resources/{file_name}") + return path diff --git a/examples/python/tests/elements/test_information.py b/examples/python/tests/elements/test_information.py index 53b695b6fc83..a2d5d030af81 100644 --- a/examples/python/tests/elements/test_information.py +++ b/examples/python/tests/elements/test_information.py @@ -1,2 +1,47 @@ from selenium import webdriver +from selenium.webdriver.common.by import By +import pytest + + +def test_informarion(): + # Initialize WebDriver + driver = webdriver.Chrome() + driver.implicitly_wait(0.5) + + driver.get("https://www.selenium.dev/selenium/web/inputs.html") + + # isDisplayed + is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() + assert is_email_visible == True + + # isEnabled + is_enabled_button = driver.find_element(By.NAME, "button_input").is_enabled() + assert is_enabled_button == True + + # isSelected + is_selected_check = driver.find_element(By.NAME, "checkbox_input").is_selected() + assert is_selected_check == True + + # TagName + tag_name_inp = driver.find_element(By.NAME, "email_input").tag_name + assert tag_name_inp == "input" + + # GetRect + rect = driver.find_element(By.NAME, "range_input").rect + assert rect["x"] == 10 + + # CSS Value + css_value = driver.find_element(By.NAME, "color_input").value_of_css_property( + "font-size" + ) + assert css_value == "13.3333px" + + # GetText + text = driver.find_element(By.TAG_NAME, "h1").text + assert text == "Testing Inputs" + + # FetchAttributes + email_txt = driver.find_element(By.NAME, "email_input") + value_info = email_txt.get_attribute("value") + assert value_info == "admin@localhost" diff --git a/examples/python/tests/elements/test_interaction.py b/examples/python/tests/elements/test_interaction.py index 53b695b6fc83..eb05f7d928a1 100644 --- a/examples/python/tests/elements/test_interaction.py +++ b/examples/python/tests/elements/test_interaction.py @@ -1,2 +1,39 @@ from selenium import webdriver +from selenium.webdriver.common.by import By +import pytest + + +def test_interactions(): + # Initialize WebDriver + driver = webdriver.Chrome() + driver.implicitly_wait(0.5) + + # Navigate to URL + driver.get("https://www.selenium.dev/selenium/web/inputs.html") + + # Click on the checkbox + check_input = driver.find_element(By.NAME, "checkbox_input") + check_input.click() + + is_checked = check_input.is_selected() + assert is_checked == False + + # Handle the email input field + email_input = driver.find_element(By.NAME, "email_input") + email_input.clear() # Clear field + + email = "admin@localhost.dev" + email_input.send_keys(email) # Enter text + + # Verify input + data = email_input.get_attribute("value") + assert data == email + + # Clear the email input field again + email_input.clear() + data = email_input.get_attribute("value") + assert data == "" + + # Quit the driver + driver.quit() diff --git a/examples/python/tests/interactions/test_cookies.py b/examples/python/tests/interactions/test_cookies.py index 53b695b6fc83..779965a8a332 100644 --- a/examples/python/tests/interactions/test_cookies.py +++ b/examples/python/tests/interactions/test_cookies.py @@ -1,2 +1,71 @@ from selenium import webdriver + +def add_cookie(): + driver = webdriver.Chrome() + driver.get("http://www.example.com") + + # Adds the cookie into current browser context + driver.add_cookie({"name": "key", "value": "value"}) + + +def get_named_cookie(): + driver = webdriver.Chrome() + driver.get("http://www.example.com") + + # Adds the cookie into current browser context + driver.add_cookie({"name": "foo", "value": "bar"}) + + # Get cookie details with named cookie 'foo' + print(driver.get_cookie("foo")) + + +def get_all_cookies(): + driver = webdriver.Chrome() + + driver.get("http://www.example.com") + + driver.add_cookie({"name": "test1", "value": "cookie1"}) + driver.add_cookie({"name": "test2", "value": "cookie2"}) + + # Get all available cookies + print(driver.get_cookies()) + +def delete_cookie(): + driver = webdriver.Chrome() + + driver.get("http://www.example.com") + + driver.add_cookie({"name": "test1", "value": "cookie1"}) + driver.add_cookie({"name": "test2", "value": "cookie2"}) + + # Delete cookie with name 'test1' + driver.delete_cookie("test1") + + +def delete_all_cookies(): + driver = webdriver.Chrome() + + driver.get("http://www.example.com") + + driver.add_cookie({"name": "test1", "value": "cookie1"}) + driver.add_cookie({"name": "test2", "value": "cookie2"}) + + # Delete all cookies + driver.delete_all_cookies() + + +def same_side_cookie_attr(): + driver = webdriver.Chrome() + + driver.get("http://www.example.com") + + # Adds the cookie into current browser context with sameSite 'Strict' (or) 'Lax' + driver.add_cookie({"name": "foo", "value": "value", "sameSite": "Strict"}) + driver.add_cookie({"name": "foo1", "value": "value", "sameSite": "Lax"}) + + cookie1 = driver.get_cookie("foo") + cookie2 = driver.get_cookie("foo1") + + print(cookie1) + print(cookie2) diff --git a/examples/python/tests/interactions/test_virtual_authenticator.py b/examples/python/tests/interactions/test_virtual_authenticator.py index 25a235635223..a40576b91bfa 100644 --- a/examples/python/tests/interactions/test_virtual_authenticator.py +++ b/examples/python/tests/interactions/test_virtual_authenticator.py @@ -48,7 +48,7 @@ def test_virtual_authenticator_options(): assert len(options.to_dict()) == 6 -def test_create_authenticator(driver): +def test_add_authenticator(driver): # Create virtual authenticator options options = VirtualAuthenticatorOptions() options.protocol = VirtualAuthenticatorOptions.Protocol.U2F @@ -93,7 +93,7 @@ def test_create_and_add_resident_key(driver): privatekey = urlsafe_b64decode(BASE64__ENCODED_PK) sign_count = 0 - # create a resident credential using above parameters + # create a resident credential using above parameters resident_credential = Credential.create_resident_credential(credential_id, rp_id, user_handle, privatekey, sign_count) # add the credential created to virtual authenticator diff --git a/examples/python/tests/resources/server.jks b/examples/python/tests/resources/server.jks new file mode 100644 index 000000000000..76579e1776c1 Binary files /dev/null and b/examples/python/tests/resources/server.jks differ diff --git a/examples/python/tests/resources/tls.crt b/examples/python/tests/resources/tls.crt new file mode 100644 index 000000000000..58a511093dde --- /dev/null +++ b/examples/python/tests/resources/tls.crt @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIIPgWI/2ppJPowDQYJKoZIhvcNAQELBQAwgYcxEDAOBgNV +BAYTB1Vua25vd24xEDAOBgNVBAgTB1Vua25vd24xEDAOBgNVBAcTB1Vua25vd24x +EzARBgNVBAoTClNlbGVuaXVtSFExJTAjBgNVBAsTHFNvZnR3YXJlIEZyZWVkb20g +Q29uc2VydmFuY3kxEzARBgNVBAMTClNlbGVuaXVtSFEwHhcNMjQxMTAzMDkwMDUz +WhcNMzQxMTAxMDkwMDUzWjCBhzEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMH +VW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjETMBEGA1UEChMKU2VsZW5pdW1IUTEl +MCMGA1UECxMcU29mdHdhcmUgRnJlZWRvbSBDb25zZXJ2YW5jeTETMBEGA1UEAxMK +U2VsZW5pdW1IUTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKVTx0e5 +6/75QgE5E6rTYPlTkIxDjZylOMT2YBNuB8vIFZkSaCtLEqto0XTVV6dQc8Ge41QV +rkt7DID1oN40rvWZdla9/2bVhCsWsRiXlvrKDbjoUi5kiLcfKJW+erUWs28xnLOw +bvGNLLAjEUitKKGpR1vsSMOuvMN9VnsSkn9smAHLT2y41CjKpvdkq+OCUdnqfYju +vV6OthRPXFMsDb1fYqZfE7fZhLc806Rg31qLssNVPwxt6VeNYi1/e5cWYeKIJQoj +sFkqIdvu7xHtR7Qu1tNdeQoiDhMS7VLdZDsnAAtQLHvyAVEBicBX95VrGnOTlKdk ++UDwyOP6djCISzUCAwEAAaNxMG8wHQYDVR0OBBYEFNrLCgZ7d2vfurWaJ4wa8O/T +PfXPME4GA1UdEQEB/wREMEKCCWxvY2FsaG9zdIITc2VsZW5pdW0tZ3JpZC5sb2Nh +bIISc2VsZW5pdW0tZ3JpZC5wcm9kggxzZWxlbml1bS5kZXYwDQYJKoZIhvcNAQEL +BQADggEBABtxoPrVrPO5ELzUuSXbvYKHQG9YEuoAisXsiOWmldXRRvT/yTr3nzJn +bC4dJywMW5unPdq1NoMxza0AF0KBFp1GzLDW5/KcA26R4IQi2xfQKVyRzb4vu0CY +BDbnzF7Bisj50sSI4WThtF4xLEHVmzJ2GWNp6SgAScIrdGeB320aTqUIDO8YHH+y +oeSu6qQfEcDiBWh3KD85vCIx0+L4AM3WKkP5nDq2FL6nwCdxqV7bo5/BZJEODMiW +xv/hw0r1OBn2T2Z6o3pRI92zu9sjj6PzPP80DUPl7+fqAaRlLFglXd8b+Qxojm9o +B0QN+gEM717L6WqmJGr1VC6HWQCvcCc= +-----END CERTIFICATE----- diff --git a/examples/python/tests/resources/tls.key b/examples/python/tests/resources/tls.key new file mode 100644 index 000000000000..d97038cd2ef8 --- /dev/null +++ b/examples/python/tests/resources/tls.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQClU8dHuev++UIB +OROq02D5U5CMQ42cpTjE9mATbgfLyBWZEmgrSxKraNF01VenUHPBnuNUFa5LewyA +9aDeNK71mXZWvf9m1YQrFrEYl5b6yg246FIuZIi3HyiVvnq1FrNvMZyzsG7xjSyw +IxFIrSihqUdb7EjDrrzDfVZ7EpJ/bJgBy09suNQoyqb3ZKvjglHZ6n2I7r1ejrYU +T1xTLA29X2KmXxO32YS3PNOkYN9ai7LDVT8MbelXjWItf3uXFmHiiCUKI7BZKiHb +7u8R7Ue0LtbTXXkKIg4TEu1S3WQ7JwALUCx78gFRAYnAV/eVaxpzk5SnZPlA8Mjj ++nYwiEs1AgMBAAECggEAA2D+tT3SGlmG9Tube2CLaRUW4shSVDBWmcSXn+teBUFv +MDwdfRMGoZJdw4eaXWz0wgaItV7QZjJbMKXfK44ZQaOTtP/4QLuzkjuKE4tXloO7 +e5BjS5eaPrSIPGU9S0cDPvjH2oP22dYi4sJYt6ry+2ODC0Mn6o3p8Dc3Ja1HvrXA +SNImimok7YemXVMbdPyaqbu2eXjPvWAA8W9/OW2L1n4U4neM0S5Nt3tVl5sMELj5 +iFC7Z+M3ZLon/54137h3xPmHYQMiPIX+PulaRLOJYSbR0dtMHhPMyWtR7GwEK4Aw +EgtDLKfa6qMv5BYsI2E0bPHRDaj39UXGeWX5/2xzyQKBgQDcMUL3sEbRmeBKhYlT +xv5ea2P4P247DDWObTDw5jLhwfmOycFcJVlaiXICpGR6hqWY8wI7kKxbQQVKFob6 +JVpIHmkkRqsV8JfXVAcaH1thlKAS4NVZsOJIVBHO3JdPaCUFq7HHbBA3436aJLtC +HiINkuiNXd2dDMuDwOsfhsRFzQKBgQDANnK1P7sZSP7dJHinA2sPSbGAK8ZTbYWD +8oe/lYlLkw6qM9i8vIKCfTpfi4vh4qfjQUczdy1w2zFbxriC2+uxhEqDN2tud3/P +0CYrO0SGQKYCROrYUh0Pl1MswBeu8yT5AdrIBK3t92wfYqTWK7VUZQaUQ7YJWfXS +usbz5qIzCQKBgH8ICHt+/gxUOtqjWYu0pPFyATWp2n1EWO13PyHrnHU0BDaFXQE9 +JuSdoOG3V6R8Y7Lul14n49etllCc2Hgd7ozmxn/AKVm5+M+oUYSXjI+qQANEJLHe +410Y60EtcDnGen1gBWtog57KpzJkeIf3fGvaUkGkYoMFa6/yL3N7u2YNAoGADH29 +WKAKpasDvRVYrenf9D9ixKSTn+pXKesB/WZXZMzqwA7cf+90P8yplXn5HjXfmTot +yV9uWY41F/TDGuX13DRvrzVTyvsDGFs7j8WrP1pGL5GQ/XvgnZnE8vyMzXbJqVEA +ic0cDIHuyd9cPPrcLt7d3ZbE5ris7APtV/5d/hkCgYAMFCYoKcCh+9/2HOgwQ1b6 +16CS71TvDBCx7+D1V3WXrIOWkNzW2SIZtnhQwglU9L7PFw6ViJAY4sB2p9hDDtcZ +e7Lotmnbrb75QQpWUyaoZMsw8l23MOGPzHKPqNiT57uOorjcFrePi9EOdERSG9+4 +lRKqCFhaNBUwQ4idzO0rWA== +-----END PRIVATE KEY----- diff --git a/examples/python/tests/selenium_manager/example_se-config.toml b/examples/python/tests/selenium_manager/example_se-config.toml new file mode 100644 index 000000000000..78eef8c2f6e7 --- /dev/null +++ b/examples/python/tests/selenium_manager/example_se-config.toml @@ -0,0 +1,21 @@ +browser = "chrome" # --browser BROWSER +driver = "chromedriver" # --driver DRIVER +browser-version = "106" # --browser-version BROWSER_VERSION +driver-version = "106.0.5249.61" # --driver-version DRIVER_VERSION +browser-path = "/usr/bin/google-chrome" # --browser-path BROWSER_PATH +driver-mirror-url = "https://custom-driver-mirror.com" # --driver-mirror-url DRIVER_MIRROR_URL +browser-mirror-url = "https://custom-browser-mirror.com" # --browser-mirror-url BROWSER_MIRROR_URL +output = "LOGGER" # --output OUTPUT +os = "linux" # --os OS +arch = "x64" # --arch ARCH +proxy = "myproxy:8080" # --proxy PROXY +timeout = 300 # --timeout TIMEOUT +offline = true # --offline +force-browser-download = true # --force-browser-download +avoid-browser-download = false # --avoid-browser-download +debug = true # --debug +trace = true # --trace +cache-path = "/custom/cache/path" # --cache-path CACHE_PATH +ttl = 3600 # --ttl TTL +language-binding = "Python" # --language-binding LANGUAGE +avoid-stats = true # --avoid-stats \ No newline at end of file diff --git a/examples/ruby/Gemfile b/examples/ruby/Gemfile index adb1c852936e..5640080815fb 100644 --- a/examples/ruby/Gemfile +++ b/examples/ruby/Gemfile @@ -7,5 +7,5 @@ gem 'rake', '~> 13.0' gem 'rspec', '~> 3.0' gem 'rubocop', '~> 1.35' gem 'rubocop-rspec', '~> 3.0' -gem 'selenium-devtools', '= 0.130.0' -gem 'selenium-webdriver', '= 4.26.0' +gem 'selenium-devtools', '= 0.131.0' +gem 'selenium-webdriver', '= 4.27.0' diff --git a/examples/ruby/Gemfile.lock b/examples/ruby/Gemfile.lock index e0bb91d9f70f..c12bca994a93 100644 --- a/examples/ruby/Gemfile.lock +++ b/examples/ruby/Gemfile.lock @@ -4,17 +4,17 @@ GEM ast (2.4.2) base64 (0.2.0) diff-lcs (1.5.1) - json (2.7.5) + json (2.9.0) language_server-protocol (3.17.0.3) logger (1.6.1) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.2) + regexp_parser (2.9.3) rexml (3.3.9) rspec (3.13.0) rspec-core (~> 3.13.0) @@ -29,25 +29,25 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.0) - rubocop (1.68.0) + rubocop (1.69.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.33.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) - rubocop-rspec (3.2.0) + rubocop-rspec (3.3.0) rubocop (~> 1.61) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-devtools (0.130.0) + selenium-devtools (0.131.0) selenium-webdriver (~> 4.2) - selenium-webdriver (4.26.0) + selenium-webdriver (4.27.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -70,8 +70,8 @@ DEPENDENCIES rspec (~> 3.0) rubocop (~> 1.35) rubocop-rspec (~> 3.0) - selenium-devtools (= 0.130.0) - selenium-webdriver (= 4.26.0) + selenium-devtools (= 0.131.0) + selenium-webdriver (= 4.27.0) BUNDLED WITH 2.5.6 diff --git a/examples/selenium-server-4.26.0.jar b/examples/selenium-server-4.27.0.jar similarity index 86% rename from examples/selenium-server-4.26.0.jar rename to examples/selenium-server-4.27.0.jar index a6db7a4e0dbd..d83dfdc21e8d 100644 Binary files a/examples/selenium-server-4.26.0.jar and b/examples/selenium-server-4.27.0.jar differ diff --git a/scripts/latest-nightly-version.ps1 b/scripts/latest-nightly-version.ps1 deleted file mode 100644 index 4db90efa291e..000000000000 --- a/scripts/latest-nightly-version.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$PACKAGE_TYPE = $args[0] -$PACKAGE_NAME = $args[1] - -$PATH_PACKAGES_API = "orgs/seleniumhq/packages/$PACKAGE_TYPE/$PACKAGE_NAME/versions" -$ACCEPT_HEADER = "Accept: application/vnd.github+json" -$VERSION_HEADER = "X-GitHub-Api-Version: 2022-11-28" - -$ghApiCommand = "gh api -H `"$ACCEPT_HEADER`" -H `"$VERSION_HEADER`" $PATH_PACKAGES_API | jq -r '.[0].name'" -Invoke-Expression -Command $ghApiCommand diff --git a/scripts/latest-nightly-version.py b/scripts/latest-nightly-version.py new file mode 100755 index 000000000000..cd51ba10cebf --- /dev/null +++ b/scripts/latest-nightly-version.py @@ -0,0 +1,31 @@ +import subprocess +import json +import argparse + +def get_latest_nightly_version(package_type, package_name): + path_packages_api = f"orgs/seleniumhq/packages/{package_type}/{package_name}/versions" + accept_header = "Accept: application/vnd.github+json" + version_header = "X-GitHub-Api-Version: 2022-11-28" + + gh_api_command = [ + "gh", "api", "-H", accept_header, "-H", version_header, path_packages_api + ] + + result = subprocess.run(gh_api_command, capture_output=True, text=True) + if result.returncode != 0: + raise Exception(f"Error executing gh api command: {result.stderr}") + + versions = json.loads(result.stdout) + latest_version = versions[0]['name'] + return latest_version + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Get the latest nightly version of a package.') + parser.add_argument('package_type', type=str, help='The type of the package') + parser.add_argument('package_name', type=str, help='The name of the package') + + args = parser.parse_args() + package_type = args.package_type + package_name = args.package_name + + print(get_latest_nightly_version(package_type, package_name)) \ No newline at end of file diff --git a/scripts/latest-nightly-version.sh b/scripts/latest-nightly-version.sh deleted file mode 100755 index fb538f594ecc..000000000000 --- a/scripts/latest-nightly-version.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -PACKAGE_TYPE="$1" -PACKAGE_NAME="$2" - -PATH_PACKAGES_API="orgs/seleniumhq/packages/$PACKAGE_TYPE/$PACKAGE_NAME/versions" -ACCEPT_HEADER="Accept: application/vnd.github+json" -VERSION_HEADER="X-GitHub-Api-Version: 2022-11-28" - -gh api -H "$ACCEPT_HEADER" -H "$VERSION_HEADER" $PATH_PACKAGES_API | jq -r '.[0].name' diff --git a/scripts/latest-python-nightly-version.py b/scripts/latest-python-nightly-version.py new file mode 100755 index 000000000000..fb1f18e812fa --- /dev/null +++ b/scripts/latest-python-nightly-version.py @@ -0,0 +1,12 @@ +import requests +import json + +response = requests.get("https://test.pypi.org/pypi/selenium/json") +data = response.json() + +# Extract versions and their upload times +versions = data['releases'] +sorted_versions = sorted(versions.items(), key=lambda item: item[1][0]['upload_time'], reverse=True) +latest_version = sorted_versions[0][0] + +print(latest_version) \ No newline at end of file diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 000000000000..663bd1f6a2ae --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1 @@ +requests \ No newline at end of file diff --git a/website_and_docs/assets/scss/_links.scss b/website_and_docs/assets/scss/_links.scss index e30a0376907d..c0555d8f57f1 100644 --- a/website_and_docs/assets/scss/_links.scss +++ b/website_and_docs/assets/scss/_links.scss @@ -1,6 +1,5 @@ .selenium-link { color: $primary; - border-bottom: 2px solid; transition: 0.3s; } @@ -10,7 +9,6 @@ p > a, main a, div > a { color: $primary !important; - border-bottom: 2px solid; transition: 0.3s; } diff --git a/website_and_docs/content/blog/2022/scaling-grid-with-keda.md b/website_and_docs/content/blog/2022/scaling-grid-with-keda.md index 5a825b14e82f..ee3b20eef140 100644 --- a/website_and_docs/content/blog/2022/scaling-grid-with-keda.md +++ b/website_and_docs/content/blog/2022/scaling-grid-with-keda.md @@ -49,6 +49,7 @@ triggers: metadata: url: 'http://selenium-grid-url-or-ip:4444/graphql' browserName: 'chrome' + platformName: 'Linux' ``` All of this gets saved as a Scaled-Object like so: @@ -69,8 +70,17 @@ spec: triggers: - type: selenium-grid metadata: - url: 'https://selenium-grid-url-or-ip:4444/graphql' + url: 'http://selenium-grid-url-or-ip:4444/graphql' browserName: 'chrome' + platformName: 'Linux' +``` + +Send the request to Grid, for example in Python client: + +```python +options = ChromeOptions() +options.set_capability('platformName', 'Linux') +driver = webdriver.Remote(options=options, command_executor='http://selenium-grid-url-or-ip:4444/wd/hub') ``` As an added bonus KEDA allows us to scale our deployments down to diff --git a/website_and_docs/content/blog/2024/selenium-4-26-released.md b/website_and_docs/content/blog/2024/selenium-4-26-released.md new file mode 100644 index 000000000000..3008954f4a29 --- /dev/null +++ b/website_and_docs/content/blog/2024/selenium-4-26-released.md @@ -0,0 +1,187 @@ +--- +title: "Selenium 4.26 Released!" +linkTitle: "Selenium 4.26 Released!" +date: 2024-11-03 +tags: ["selenium"] +categories: ["releases"] +author: Diego Molina [@diemol](https://www.diemol.com) +images: + - "/images/blog/2024/selenium_4.26.jpg" +description: > + Today we're happy to announce that Selenium 4.26 has been released! +--- + +We're very happy to announce the release of Selenium 4.26 for +Javascript, Ruby, Python, .NET, Java and the Grid! +Links to everything can be found on our [downloads page][downloads]. + +Selenium 4.26.0 release introduces new features, key enhancements, and numerous bug fixes across +different languages and components. This version focuses on improving compatibility, updating +dependencies, enhancing internal logging, and providing broader WebDriver capabilities. Here are +the most important updates: + +## General Highlights +- **Chrome DevTools support** is now: v130, v129, and v128 (Firefox still uses v85 for all versions) +- **Selenium has at least** [4.8M active users](https://plausible.io/manager.selenium.dev) in the last 30 days. 800K more than 1 month ago! +- **Selenium Manager Enhancements**: Added better handling for invalid browser versions and improved logging, helping to streamline browser management. +- **Expanded BiDi (Bidirectional WebDriver Protocol) Support for .NET**: Continuing the work on BiDi for .NET, this release includes improved WebSocket communication, CDP DevTools integration, and expanded logging, advancing real-time and bidirectional interactions. +- **Grid UI Enhancements**: New sorting options by Platform, Status, and ID, session timeout display, and WebSocket connection management for better performance and user experience. +- **CI/CD Pipeline Improvements**: Numerous updates for CI workflows, such as artifact handling and new testing configurations, to boost stability and developer productivity. + +
+ +### .NET +- Updated WebSocket communication and DevTools integration in the BiDi implementation, adding extensive internal logs to improve diagnostics ([#14566](https://github.com/SeleniumHQ/selenium/pull/14566), [#14558](https://github.com/SeleniumHQ/selenium/pull/14558)). +- Added support for the `GetLog` command in the Remote WebDriver ([#14549](https://github.com/SeleniumHQ/selenium/pull/14549)). +- Enhanced configuration for `PrintOptions`, allowing direct control over `PageDimensions` and `PageMargins` ([#14593](https://github.com/SeleniumHQ/selenium/pull/14593)). +- Deprecated several old constructors for cleaner exception handling and improved compatibility with Ahead-of-Time (AOT) compilation ([#14574](https://github.com/SeleniumHQ/selenium/pull/14574)). + +
+ +### Java +- Increased property scope for improved compatibility with Appium ([#14183](https://github.com/SeleniumHQ/selenium/pull/14183)). +- Updated SpotBugs settings and fixed issues in `ChromiumDriver` and `PortProber` for cleaner code ([#14589](https://github.com/SeleniumHQ/selenium/pull/14589)). +- Added PAC proxy URL support for Selenium Manager to expand proxy configuration capabilities ([#14506](https://github.com/SeleniumHQ/selenium/pull/14506)). + +
+ +### Python +- Added more internal logging for CDP, and configured WebDriver HTTP client settings for enhanced performance ([#14668](https://github.com/SeleniumHQ/selenium/pull/14668), [#13286](https://github.com/SeleniumHQ/selenium/pull/13286)). + > Explore the various configuration parameters for the [WebDriver HTTP client](https://www.selenium.dev/documentation/webdriver/drivers/http_client/). +- Removed deprecated EdgeService parameters and eliminated Python 2.x code from various test files ([#14563](https://github.com/SeleniumHQ/selenium/pull/14563), [#14502](https://github.com/SeleniumHQ/selenium/pull/14502)). +- Set consistent polling for `WebDriverWait` methods to align behavior between Java and Python implementations ([#14626](https://github.com/SeleniumHQ/selenium/pull/14626)). +- Improves binding extensibility for seamless integration of Selenium into Appium's Python client. ([#14587](https://github.com/SeleniumHQ/selenium/pull/14587)). + +
+ +### JavaScript +- Closed BiDi WebSocket connection on session end, improving session management in BiDi ([#14507](https://github.com/SeleniumHQ/selenium/pull/14507)). +- Fixed issues with `sendKeys` command, addressing errors in `FileDetector` handling ([#14663](https://github.com/SeleniumHQ/selenium/pull/14663)). + +
+ +### Ruby +- Added RBS type support for BiDi-related classes, aligning with updates for Ruby BiDi compatibility ([#14611](https://github.com/SeleniumHQ/selenium/pull/14611)). +- Updated BiDi script structures to match recent specifications for consistent implementation ([#14236](https://github.com/SeleniumHQ/selenium/pull/14236)). + +
+ +### Selenium Grid +- New Grid UI features for sorting and WebSocket management, adding clarity and control to session management ([#14571](https://github.com/SeleniumHQ/selenium/pull/14571), [#14598](https://github.com/SeleniumHQ/selenium/pull/14598), [#14599](https://github.com/SeleniumHQ/selenium/pull/14599)). +- Enabled async requests in `httpclient` to enhance request handling performance ([#14409](https://github.com/SeleniumHQ/selenium/pull/14409)). +- Improved node handling for better scalability and stability ([#14628](https://github.com/SeleniumHQ/selenium/pull/14628)). + +
+ +### Docker Selenium +- Updated FFmpeg v7.1 in video recorder ([#2439](https://github.com/SeleniumHQ/docker-selenium/pull/2439)). +- Updated in Helm chart for Selenium Grid deployment to Kubernetes + - Add GraphQL metrics exporter for monitoring ([#2425](https://github.com/SeleniumHQ/docker-selenium/pull/2425)). + - Add templates for Relay node ([#2453](https://github.com/SeleniumHQ/docker-selenium/pull/2453)). + - Allow to overwrite config videoRecorder in each node ([#2445](https://github.com/SeleniumHQ/docker-selenium/pull/2445)). + +
+ +## Contributors + +**Special shout-out to everyone who helped the Selenium Team get this release out!** + +### [Selenium](https://github.com/SeleniumHQ/selenium) + +
+
+
+{{< gh-user "https://api.github.com/users/BlitzDestroyer" >}} +{{< gh-user "https://api.github.com/users/Delta456" >}} +{{< gh-user "https://api.github.com/users/Mr0grog" >}} +{{< gh-user "https://api.github.com/users/RenderMichael" >}} +{{< gh-user "https://api.github.com/users/aguspe" >}} +{{< gh-user "https://api.github.com/users/dbernhard-0x7CD" >}} +{{< gh-user "https://api.github.com/users/garg3133" >}} +{{< gh-user "https://api.github.com/users/iampopovich" >}} +{{< gh-user "https://api.github.com/users/mk868" >}} +{{< gh-user "https://api.github.com/users/navin772" >}} +{{< gh-user "https://api.github.com/users/shbenzer" >}} +
+
+
+ + +### [Selenium Docs & Website](https://github.com/SeleniumHQ/seleniumhq.github.io) + +
+
+
+{{< gh-user "https://api.github.com/users/Abdelrhman-Ellithy" >}} +{{< gh-user "https://api.github.com/users/AishIngale" >}} +{{< gh-user "https://api.github.com/users/Delta456" >}} +{{< gh-user "https://api.github.com/users/alaahong" >}} +{{< gh-user "https://api.github.com/users/harshitBhardwaj97" >}} +{{< gh-user "https://api.github.com/users/pallavigitwork" >}} +{{< gh-user "https://api.github.com/users/shbenzer" >}} +{{< gh-user "https://api.github.com/users/zipperer" >}} +
+
+
+ +### [Docker Selenium](https://github.com/SeleniumHQ/docker-selenium) + +
+
+
+{{< gh-user "https://api.github.com/users/brunobritorj" >}} +
+
+
+ +### [Selenium Team Members][team] + +**Thanks as well to all the team members who contributed to this release:** + +
+
+
+{{< gh-user "https://api.github.com/users/AutomatedTester" >}} +{{< gh-user "https://api.github.com/users/bonigarcia" >}} +{{< gh-user "https://api.github.com/users/diemol" >}} +{{< gh-user "https://api.github.com/users/harsha509" >}} +{{< gh-user "https://api.github.com/users/joerg1985" >}} +{{< gh-user "https://api.github.com/users/nvborisenko" >}} +{{< gh-user "https://api.github.com/users/p0deje" >}} +{{< gh-user "https://api.github.com/users/pujagani" >}} +{{< gh-user "https://api.github.com/users/shs96c" >}} +{{< gh-user "https://api.github.com/users/titusfortner" >}} +{{< gh-user "https://api.github.com/users/VietND96" >}} +
+
+
+ +## Project Highlights + +This year marks a monumental milestone—20 years of Selenium transforming browser automation! +Since its inception as a modest open-source project, Selenium has grown into the world’s most +trusted tool for web automation, powering testing and development for countless users globally. +From revolutionizing open-source collaboration to shaping automation practices, Selenium has +impacted developers, testers, and organizations worldwide. + +To honor this journey, the Selenium team hosted a special webinar on October 28th, 2024, where +the leadership team shared insights on Selenium’s evolution, the latest advancements in WebDriver +BiDi, and exciting prospects for the future. If you’d like to learn more about Selenium’s +incredible journey and future plans, head to the official blog post +[here](https://www.selenium.dev/blog/2024/selenium-milestone-20yrs-blog/). + +Special thanks to the Selenium community for your continued support and contributions, to +the entire Selenium team for their dedication and hard work, +and to [Pallavi Sharma](https://www.linkedin.com/in/pallavimuse/) and +[Maaret Pyhäjärvi](https://www.linkedin.com/in/maaret/) for organizing and leading this event. + + + +Stay tuned for updates by following SeleniumHQ on [X (Formerly Twitter)](https://twitter.com/seleniumhq) or [LinkedIn](https://www.linkedin.com/company/selenium/)! + +Happy automating! + +[downloads]: /downloads +[bindings]: /downloads#bindings +[team]: /project/structure +[BiDi]: https://github.com/w3c/webdriver-bidi diff --git a/website_and_docs/content/blog/2024/selenium-4-27-released.md b/website_and_docs/content/blog/2024/selenium-4-27-released.md new file mode 100644 index 000000000000..5c25525cda3c --- /dev/null +++ b/website_and_docs/content/blog/2024/selenium-4-27-released.md @@ -0,0 +1,186 @@ +--- +title: "Selenium 4.27 Released!" +linkTitle: "Selenium 4.27 Released!" +date: 2024-11-27 +tags: ["selenium"] +categories: ["releases"] +author: Diego Molina [@diemol](https://www.diemol.com) +images: + - "/images/blog/2024/selenium_4.27.webp" +description: > + Today we're happy to announce that Selenium 4.27 has been released! +--- +We're very happy to announce the release of Selenium 4.27 for +Javascript, Ruby, Python, .NET, Java and the Grid! +Links to everything can be found on our [downloads page][downloads]. + +Here is the latest iteration of the world’s most popular browser automation tool! This release +brings significant updates across all supported languages, enhancing functionality, performance, +and compatibility. From new features like FedCM command support in Python and improved BiDi +handling in .NET to critical deprecations like CDP methods for Firefox. + +## General Highlights + +- **Chrome DevTools support** is now: v131, v128, and v127 (Firefox still uses v85 for all versions) +- **Selenium has over** [5.1M active users](https://plausible.io/manager.selenium.dev) in the last 30 days. 300K more than 1 month ago! +- **Deprecation of CDP methods for Firefox** across several bindings to align with evolving automation standards. +- **Enhanced Selenium Grid** with improved session handling, distributed retry logic, and faster server shutdown processes. +- **Updates for .NET and Java** to modernize exception handling, improve BiDi support, and address compatibility warnings. +- **Deprecation of `getAttribute`** in multiple languages as part of Selenium's evolution. + + +
+ +### Python +- Deprecated CDP methods for Firefox. ([e2e9ac5f7e](https://github.com/SeleniumHQ/selenium/commit/e2e9ac5f7e5ca2a2326bea9d16425525ce43da57)) +- Replaced `imghdr` with `filetype` for better compatibility. ([b1828bf108](https://github.com/SeleniumHQ/selenium/commit/b1828bf1087d7d4acfd437d83ef6168617286191)) +- Moved project metadata from `setup.py` to `pyproject.toml`. ([673d2c78be](https://github.com/SeleniumHQ/selenium/commit/673d2c78be76f1ccbb2e1017e5240d52f428b400)) +- Added FedCM command support. ([d3d8070d50](https://github.com/SeleniumHQ/selenium/commit/d3d8070d50b481d2c6da98223322bc843cc25a01)) +- Introduced backward compatibility for `AppiumConnection`. ([3a3c46b3c1](https://github.com/SeleniumHQ/selenium/commit/3a3c46b3c144b0a350dea3598481edd2761f11c5)) +- Added user agent and extra headers via `ClientConfig`. ([e2023893c7](https://github.com/SeleniumHQ/selenium/commit/e2023893c7f37f69b2f7106a3907e0275bd9fbe1)) +- Addressed `DetachedShadowRoot` exception handling. ([7aabb8d1b4](https://github.com/SeleniumHQ/selenium/commit/7aabb8d1b48c1cae74ae97710009daea960dc9a3)) + +
+ +### Ruby +- Deprecated CDP methods for Firefox. ([e9c09a200e](https://github.com/SeleniumHQ/selenium/commit/e9c09a200e374bba63acb0ef605175abb125e82e)) +- Resolved deprecation warnings for the `uri` gem. ([751bacb6bc](https://github.com/SeleniumHQ/selenium/commit/751bacb6bc934436ec9dec2416a022d8d577e30a)) +- Added BiDi navigation commands and support for network interception. ([573c8fe961](https://github.com/SeleniumHQ/selenium/commit/573c8fe9612c9c81406642e3e7a917cb5314eb3c)) + + +
+ +### Java +- Enhanced error messages for `NoSuchElementException`. ([4a0d05e50e](https://github.com/SeleniumHQ/selenium/commit/4a0d05e50ea1750482211e04ece8062436eb5c6b)) +- Deprecated `WebElement.getAttribute()`. ([cd7303c437](https://github.com/SeleniumHQ/selenium/commit/cd7303c437b0702d3a17c9ef43594375c11016eb)) +- Introduced methods for selecting options containing specific text. ([b4b8aaba2b](https://github.com/SeleniumHQ/selenium/commit/b4b8aaba2bd3df57cae31164c614aec5f377c443)) +- Added Firefox CDP deprecation warnings. ([19fc217985](https://github.com/SeleniumHQ/selenium/commit/19fc2179855d0f70b7241a6c4cfbd9152e023609)) + +
+ +### .NET +- Added CDP deprecation warnings for Firefox. ([8f725b3a80](https://github.com/SeleniumHQ/selenium/commit/8f725b3a80c3f3d621821e94a87db346ea91a8b1)) +- Improved BiDi and async support across modules. ([9054e892cc](https://github.com/SeleniumHQ/selenium/commit/9054e892ccabfb470243e2bad585f0474901dd31)) +- Enabled nullability annotations for better type safety. ([d9149acc09](https://github.com/SeleniumHQ/selenium/commit/d9149acc097531d336e611bd92d897381a0316c6)) +- Introduced compatibility improvements for actions with clashing device names. ([a9ec9ca682](https://github.com/SeleniumHQ/selenium/commit/a9ec9ca6821fd466e8e9d6e966d0feb150b0a5a4)) +- **Deprecated `GetAttribute` method** for WebElements. ([ac523a5d0a](https://github.com/SeleniumHQ/selenium/commit/ac523a5d0aa5a980a71c5adda3f4dafb0a560409)) + + +
+ +### JavaScript +- Enabled BiDi tests for locating nodes with Chrome and Edge. ([339421538b](https://github.com/SeleniumHQ/selenium/commit/339421538b790c0ac2cf0a1a0aad62d0e76349eb)) +- Enhanced support for authentication handlers in BiDi commands. ([25551adfe8](https://github.com/SeleniumHQ/selenium/commit/25551adfe80f788453ec38fac7933c5369616d4f)) +- Updated dependencies to resolve security alerts. ([3906742748](https://github.com/SeleniumHQ/selenium/commit/3906742748d8b94b2eac074aeaf839eed20a95fa)) + +
+ +### Rust +- Selenium Manager now honors full browser versions. ([fe5b1985e5](https://github.com/SeleniumHQ/selenium/commit/fe5b1985e570bae90bf757c23439d461ef0dda9c)) +- Updated logic to prioritize stable versions for Firefox management. ([0d2dda17b4](https://github.com/SeleniumHQ/selenium/commit/0d2dda17b4c4aba6ab0537f9d28910527c45a38b)) + +
+ +### Selenium Grid +- Improved retry logic for session creation in distributed grids. ([e4ab299ea4](https://github.com/SeleniumHQ/selenium/commit/e4ab299ea4d16943c18e8c31e9db1f7738ed9493)) +- Improved session handling in Selenium Grid and reduced test flakiness. ([b0464e1adf](https://github.com/SeleniumHQ/selenium/commit/b0464e1adf8b4367dab9a98c26c800a7172cc0f8)) +- Enhanced server shutdown for faster termination. ([62aa0e551e](https://github.com/SeleniumHQ/selenium/commit/62aa0e551e79176f21e3e1658518bc40855f81ae)) +- Implemented graceful handling of stale sessions and client timeouts. ([b0464e1adf](https://github.com/SeleniumHQ/selenium/commit/b0464e1adf8b4367dab9a98c26c800a7172cc0f8)) +- Improved detection of unsupported HTTP methods during request handling. ([f56b3d07d9](https://github.com/SeleniumHQ/selenium/commit/f56b3d07d932f81bafc80b90d9b3cb059fba133e)) + +
+ +### Docker Selenium +- K8s: Allow multiple nodes of the same type in Helm configuration ([#2475](https://github.com/SeleniumHQ/docker-selenium/pull/2475)) +- [See all changes](https://github.com/SeleniumHQ/docker-selenium/releases/tag/4.27.0-20241127) + +
+ +## Contributors + +**Special shout-out to everyone who helped the Selenium Team get this release out!** + +### [Selenium](https://github.com/SeleniumHQ/selenium) + +
+
+
+{{< gh-user "https://api.github.com/users/Delta456" >}} +{{< gh-user "https://api.github.com/users/Earlopain" >}} +{{< gh-user "https://api.github.com/users/RenderMichael" >}} +{{< gh-user "https://api.github.com/users/andrew" >}} +{{< gh-user "https://api.github.com/users/emanlove" >}} +{{< gh-user "https://api.github.com/users/iampopovich" >}} +{{< gh-user "https://api.github.com/users/josegomezr" >}} +{{< gh-user "https://api.github.com/users/mk868" >}} +{{< gh-user "https://api.github.com/users/navin772" >}} +{{< gh-user "https://api.github.com/users/pnatashap" >}} +{{< gh-user "https://api.github.com/users/sandeepsuryaprasad" >}} +{{< gh-user "https://api.github.com/users/shbenzer" >}} +{{< gh-user "https://api.github.com/users/syber911911" >}} +
+
+
+ + +### [Selenium Docs & Website](https://github.com/SeleniumHQ/seleniumhq.github.io) + +
+
+
+{{< gh-user "https://api.github.com/users/AishIngale" >}} +{{< gh-user "https://api.github.com/users/RenderMichael" >}} +{{< gh-user "https://api.github.com/users/YevgeniyShunevych" >}} +{{< gh-user "https://api.github.com/users/alaahong" >}} +{{< gh-user "https://api.github.com/users/jasonren0403" >}} +{{< gh-user "https://api.github.com/users/navin772" >}} +{{< gh-user "https://api.github.com/users/pallavigitwork" >}} +{{< gh-user "https://api.github.com/users/shbenzer" >}} +{{< gh-user "https://api.github.com/users/zipperer" >}} +
+
+
+ +### [Docker Selenium](https://github.com/SeleniumHQ/docker-selenium) + +
+
+
+{{< gh-user "https://api.github.com/users/VietND96" >}} +
+
+
+ +### [Selenium Team Members][team] + +**Thanks as well to all the team members who contributed to this release:** + +
+
+
+{{< gh-user "https://api.github.com/users/aguspe" >}} +{{< gh-user "https://api.github.com/users/AutomatedTester" >}} +{{< gh-user "https://api.github.com/users/bonigarcia" >}} +{{< gh-user "https://api.github.com/users/diemol" >}} +{{< gh-user "https://api.github.com/users/harsha509" >}} +{{< gh-user "https://api.github.com/users/joerg1985" >}} +{{< gh-user "https://api.github.com/users/nvborisenko" >}} +{{< gh-user "https://api.github.com/users/p0deje" >}} +{{< gh-user "https://api.github.com/users/pujagani" >}} +{{< gh-user "https://api.github.com/users/shs96c" >}} +{{< gh-user "https://api.github.com/users/titusfortner" >}} +{{< gh-user "https://api.github.com/users/VietND96" >}} +
+
+
+ + + +Stay tuned for updates by following SeleniumHQ on [X (Formerly Twitter)](https://twitter.com/seleniumhq) or [LinkedIn](https://www.linkedin.com/company/selenium/)! + +Happy automating! + +[downloads]: /downloads +[bindings]: /downloads#bindings +[team]: /project/structure +[BiDi]: https://github.com/w3c/webdriver-bidi diff --git a/website_and_docs/content/blog/2024/selenium-community-live-episode1.md b/website_and_docs/content/blog/2024/selenium-community-live-episode1.md new file mode 100644 index 000000000000..6e0069410d94 --- /dev/null +++ b/website_and_docs/content/blog/2024/selenium-community-live-episode1.md @@ -0,0 +1,49 @@ +--- +title: "Selenium Community Live - Episode 1" +linkTitle: "Selenium Community Live - Episode 1" +date: 2024-12-25 +tags: ["webinar", "meetup", "talks","community"] +categories: ["webinar"] +author: Pallavi Sharma +images: +description: > + Selenium Community Live - Episode 1 +--- + +At the eve of celebration of 20 years of Selenium, the current **Project Leadership Committee of Selenium** decided on starting Selenium Community Live event, an idea helmed by **Maaret Pyhäjärvi** . +The first episode happened on Dec 18th, 2024: **Selenium Community Live - Episode 1** + +**Selenium Community Live - Episode 1** + +Collaboration, communication and community are the force behind the success of the Selenium Project in open source for last twenty years. +Jason Huggins and Simon Stewart with their respective projects Selenium and WebDriver collaborated and brought together Selenium WebDriver. +Eventually WebDriver became a W3C standard for browser automation, and Jim Evans and Manoj Kumar in the first episode of Selenium Community Live +discuss all about Selenium, and making of the WebDriver standard. They shed light on the process and people behind building these specifications. +They also spoke about various browser vendors and browser automation projects coming together to collaborate on making the next standard in browser automation +WebDriver Bi-Di. The Selenium project extend thanks to both Jim and Manoj for commemorating the first episode for community. + +**Meet the Speakers:** + +1. **Jim Evans** + +2. **Manoj Kumar** + +## Watch the Recording the first Episode of Selenium Community Live + +Couldn’t join us live? Watch the entire episode here - +📹 Recording Link: [Watch the Event Recording on YouTube](https://www.youtube.com/watch?v=Y4tZOXGQGRQ) + +The links for the various projects which were discussed in the event - + +A few links which you may wish to explore - +**TPAC** + +**W3C Browser Testing Working Group** + +**WebDriver** + +**WebDriver Bi-Di** + +**WebDriver Bi-Di .net implementation by Jim Evans ** + +Stay tuned as we bring the next! **Subscribe here to the Selenium HQ Official YouTube Channel.** \ No newline at end of file diff --git a/website_and_docs/content/documentation/overview/details.en.md b/website_and_docs/content/documentation/overview/details.en.md index 53b1064cffa3..7700beaa9475 100644 --- a/website_and_docs/content/documentation/overview/details.en.md +++ b/website_and_docs/content/documentation/overview/details.en.md @@ -40,8 +40,8 @@ Web browsers are incredibly complex, highly engineered applications, performing their operations in entirely different ways but which frequently look the same while doing so. Even though the text is rendered in the same fonts, -the images are displayed in the same place -, and the links take you to the same destination. +the images are displayed in the same place, +and the links take you to the same destination. What is happening underneath is as different as night and day. Selenium “abstracts” these differences, hiding their details and intricacies from the person writing the code. diff --git a/website_and_docs/content/documentation/selenium_manager.en.md b/website_and_docs/content/documentation/selenium_manager.en.md index fac44d989985..f880245f004f 100644 --- a/website_and_docs/content/documentation/selenium_manager.en.md +++ b/website_and_docs/content/documentation/selenium_manager.en.md @@ -141,6 +141,13 @@ In addition to the configuration keys specified in the table before, there are s - Driver mirror. Following the same pattern, we can use `chromedriver-mirror-url`, `geckodriver-mirror-url`, `msedgedriver-mirror-url`, etc. (in the configuration file), and `SE_CHROMEDRIVER_MIRROR_URL`, `SE_GECKODRIVER_MIRROR_URL`, `SE_MSEDGEDRIVER_MIRROR_URL`, etc. (as environment variables). - Browser mirror. Following the same pattern, we can use `chrome-mirror-url`, `firefox-mirror-url`, `edge-mirror-url`, etc. (in the configuration file), and `SE_CHROME_MIRROR_URL`, `SE_FIREFOX_MIRROR_URL`, `SE_EDGE_MIRROR_URL`, etc. (as environment variables). +### se-config.toml Example +{{< tabpane text=true >}} +{{< tab header="se-config.toml" >}} +{{< gh-codeblock path="examples/python/tests/selenium_manager/example_se-config.toml#L1-L21" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Caching ***TL;DR:*** *The drivers and browsers managed by Selenium Manager are stored in a local folder (`~/.cache/selenium`).* @@ -333,11 +340,11 @@ sudo apt-get install libatk-bridge2.0-0 It's possible to use an environment variable to specify the driver path without using Selenium Manager. The following environment variables are supported: -* SE_CHROMEDRIVER -* SE_EDGEDRIVER -* SE_GECKODRIVER -* SE_IEDRIVER -* SE_SAFARIDRIVER +* `SE_CHROMEDRIVER` +* `SE_EDGEDRIVER` +* `SE_GECKODRIVER` +* `SE_IEDRIVER` +* `SE_SAFARIDRIVER` For example, to specify the path to the chromedriver, you can set the `SE_CHROMEDRIVER` environment variable to the path of the chromedriver executable. @@ -345,8 +352,21 @@ The following bindings allow you to specify the driver path using an environment * Ruby * Java +* Python + +This feature is available in the Selenium Ruby binding starting from version 4.25.0 and in the Python binding from version 4.26.0. + +## Building a Custom Selenium Manager +In order to build your own custom Selenium Manager that works in an architecture we don't currently support, you can +utilize the following steps: -This feature is available in the Selenium Ruby binding starting from version 4.25.0. +1. Install Rust Dev Environment +2. clone Selenium onto your local machine `git clone https://github.com/SeleniumHQ/selenium.git --depth 1` +3. Navigate into your clone `cd selenium/rust` +4. Build selenium `cargo build --release` +5. Set the following environment variable for the driver path `SE_MANAGER_PATH=~/selenium/rust/target/release/selenium-manager` +6. Put the driver you want in a location on your system PATH +7. Selenium will now use the built Selenium Manager to locate the manually downloaded driver on PATH ## Roadmap You can trace the work in progress in the [Selenium Manager project dashboard](https://github.com/orgs/SeleniumHQ/projects/5). Moreover, you can check the new features shipped with each Selenium Manager release in its [changelog file](https://github.com/SeleniumHQ/selenium/blob/trunk/rust/CHANGELOG.md). diff --git a/website_and_docs/content/documentation/selenium_manager.ja.md b/website_and_docs/content/documentation/selenium_manager.ja.md index e5b66188040e..075206a21037 100644 --- a/website_and_docs/content/documentation/selenium_manager.ja.md +++ b/website_and_docs/content/documentation/selenium_manager.ja.md @@ -141,6 +141,13 @@ In addition to the configuration keys specified in the table before, there are s - Driver mirror. Following the same pattern, we can use `chromedriver-mirror-url`, `geckodriver-mirror-url`, `msedgedriver-mirror-url`, etc. (in the configuration file), and `SE_CHROMEDRIVER_MIRROR_URL`, `SE_GECKODRIVER_MIRROR_URL`, `SE_MSEDGEDRIVER_MIRROR_URL`, etc. (as environment variables). - Browser mirror. Following the same pattern, we can use `chrome-mirror-url`, `firefox-mirror-url`, `edge-mirror-url`, etc. (in the configuration file), and `SE_CHROME_MIRROR_URL`, `SE_FIREFOX_MIRROR_URL`, `SE_EDGE_MIRROR_URL`, etc. (as environment variables). +### se-config.toml Example +{{< tabpane text=true >}} +{{< tab header="se-config.toml" >}} +{{< gh-codeblock path="examples/python/tests/selenium_manager/example_se-config.toml#L1-L21" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Caching ***TL;DR:*** *The drivers and browsers managed by Selenium Manager are stored in a local folder (`~/.cache/selenium`).* @@ -333,11 +340,11 @@ sudo apt-get install libatk-bridge2.0-0 It's possible to use an environment variable to specify the driver path without using Selenium Manager. The following environment variables are supported: -* SE_CHROMEDRIVER -* SE_EDGEDRIVER -* SE_GECKODRIVER -* SE_IEDRIVER -* SE_SAFARIDRIVER +* `SE_CHROMEDRIVER` +* `SE_EDGEDRIVER` +* `SE_GECKODRIVER` +* `SE_IEDRIVER` +* `SE_SAFARIDRIVER` For example, to specify the path to the chromedriver, you can set the `SE_CHROMEDRIVER` environment variable to the path of the chromedriver executable. @@ -345,8 +352,21 @@ The following bindings allow you to specify the driver path using an environment * Ruby * Java +* Python + +This feature is available in the Selenium Ruby binding starting from version 4.25.0 and in the Python binding from version 4.26.0. + +## Building a Custom Selenium Manager +In order to build your own custom Selenium Manager that works in an architecture we don't currently support, you can +utilize the following steps: -This feature is available in the Selenium Ruby binding starting from version 4.25.0. +1. Install Rust Dev Environment +2. clone Selenium onto your local machine `git clone https://github.com/SeleniumHQ/selenium.git --depth 1` +3. Navigate into your clone `cd selenium/rust` +4. Build selenium `cargo build --release` +5. Set the following environment variable for the driver path `SE_MANAGER_PATH=~/selenium/rust/target/release/selenium-manager` +6. Put the driver you want in a location on your system PATH +7. Selenium will now use the built Selenium Manager to locate the manually downloaded driver on PATH ## Roadmap You can trace the work in progress in the [Selenium Manager project dashboard](https://github.com/orgs/SeleniumHQ/projects/5). Moreover, you can check the new features shipped with each Selenium Manager release in its [changelog file](https://github.com/SeleniumHQ/selenium/blob/trunk/rust/CHANGELOG.md). diff --git a/website_and_docs/content/documentation/selenium_manager.pt-br.md b/website_and_docs/content/documentation/selenium_manager.pt-br.md index e5b66188040e..075206a21037 100644 --- a/website_and_docs/content/documentation/selenium_manager.pt-br.md +++ b/website_and_docs/content/documentation/selenium_manager.pt-br.md @@ -141,6 +141,13 @@ In addition to the configuration keys specified in the table before, there are s - Driver mirror. Following the same pattern, we can use `chromedriver-mirror-url`, `geckodriver-mirror-url`, `msedgedriver-mirror-url`, etc. (in the configuration file), and `SE_CHROMEDRIVER_MIRROR_URL`, `SE_GECKODRIVER_MIRROR_URL`, `SE_MSEDGEDRIVER_MIRROR_URL`, etc. (as environment variables). - Browser mirror. Following the same pattern, we can use `chrome-mirror-url`, `firefox-mirror-url`, `edge-mirror-url`, etc. (in the configuration file), and `SE_CHROME_MIRROR_URL`, `SE_FIREFOX_MIRROR_URL`, `SE_EDGE_MIRROR_URL`, etc. (as environment variables). +### se-config.toml Example +{{< tabpane text=true >}} +{{< tab header="se-config.toml" >}} +{{< gh-codeblock path="examples/python/tests/selenium_manager/example_se-config.toml#L1-L21" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Caching ***TL;DR:*** *The drivers and browsers managed by Selenium Manager are stored in a local folder (`~/.cache/selenium`).* @@ -333,11 +340,11 @@ sudo apt-get install libatk-bridge2.0-0 It's possible to use an environment variable to specify the driver path without using Selenium Manager. The following environment variables are supported: -* SE_CHROMEDRIVER -* SE_EDGEDRIVER -* SE_GECKODRIVER -* SE_IEDRIVER -* SE_SAFARIDRIVER +* `SE_CHROMEDRIVER` +* `SE_EDGEDRIVER` +* `SE_GECKODRIVER` +* `SE_IEDRIVER` +* `SE_SAFARIDRIVER` For example, to specify the path to the chromedriver, you can set the `SE_CHROMEDRIVER` environment variable to the path of the chromedriver executable. @@ -345,8 +352,21 @@ The following bindings allow you to specify the driver path using an environment * Ruby * Java +* Python + +This feature is available in the Selenium Ruby binding starting from version 4.25.0 and in the Python binding from version 4.26.0. + +## Building a Custom Selenium Manager +In order to build your own custom Selenium Manager that works in an architecture we don't currently support, you can +utilize the following steps: -This feature is available in the Selenium Ruby binding starting from version 4.25.0. +1. Install Rust Dev Environment +2. clone Selenium onto your local machine `git clone https://github.com/SeleniumHQ/selenium.git --depth 1` +3. Navigate into your clone `cd selenium/rust` +4. Build selenium `cargo build --release` +5. Set the following environment variable for the driver path `SE_MANAGER_PATH=~/selenium/rust/target/release/selenium-manager` +6. Put the driver you want in a location on your system PATH +7. Selenium will now use the built Selenium Manager to locate the manually downloaded driver on PATH ## Roadmap You can trace the work in progress in the [Selenium Manager project dashboard](https://github.com/orgs/SeleniumHQ/projects/5). Moreover, you can check the new features shipped with each Selenium Manager release in its [changelog file](https://github.com/SeleniumHQ/selenium/blob/trunk/rust/CHANGELOG.md). diff --git a/website_and_docs/content/documentation/selenium_manager.zh-cn.md b/website_and_docs/content/documentation/selenium_manager.zh-cn.md index e5b66188040e..075206a21037 100644 --- a/website_and_docs/content/documentation/selenium_manager.zh-cn.md +++ b/website_and_docs/content/documentation/selenium_manager.zh-cn.md @@ -141,6 +141,13 @@ In addition to the configuration keys specified in the table before, there are s - Driver mirror. Following the same pattern, we can use `chromedriver-mirror-url`, `geckodriver-mirror-url`, `msedgedriver-mirror-url`, etc. (in the configuration file), and `SE_CHROMEDRIVER_MIRROR_URL`, `SE_GECKODRIVER_MIRROR_URL`, `SE_MSEDGEDRIVER_MIRROR_URL`, etc. (as environment variables). - Browser mirror. Following the same pattern, we can use `chrome-mirror-url`, `firefox-mirror-url`, `edge-mirror-url`, etc. (in the configuration file), and `SE_CHROME_MIRROR_URL`, `SE_FIREFOX_MIRROR_URL`, `SE_EDGE_MIRROR_URL`, etc. (as environment variables). +### se-config.toml Example +{{< tabpane text=true >}} +{{< tab header="se-config.toml" >}} +{{< gh-codeblock path="examples/python/tests/selenium_manager/example_se-config.toml#L1-L21" >}} +{{< /tab >}} +{{< /tabpane >}} + ## Caching ***TL;DR:*** *The drivers and browsers managed by Selenium Manager are stored in a local folder (`~/.cache/selenium`).* @@ -333,11 +340,11 @@ sudo apt-get install libatk-bridge2.0-0 It's possible to use an environment variable to specify the driver path without using Selenium Manager. The following environment variables are supported: -* SE_CHROMEDRIVER -* SE_EDGEDRIVER -* SE_GECKODRIVER -* SE_IEDRIVER -* SE_SAFARIDRIVER +* `SE_CHROMEDRIVER` +* `SE_EDGEDRIVER` +* `SE_GECKODRIVER` +* `SE_IEDRIVER` +* `SE_SAFARIDRIVER` For example, to specify the path to the chromedriver, you can set the `SE_CHROMEDRIVER` environment variable to the path of the chromedriver executable. @@ -345,8 +352,21 @@ The following bindings allow you to specify the driver path using an environment * Ruby * Java +* Python + +This feature is available in the Selenium Ruby binding starting from version 4.25.0 and in the Python binding from version 4.26.0. + +## Building a Custom Selenium Manager +In order to build your own custom Selenium Manager that works in an architecture we don't currently support, you can +utilize the following steps: -This feature is available in the Selenium Ruby binding starting from version 4.25.0. +1. Install Rust Dev Environment +2. clone Selenium onto your local machine `git clone https://github.com/SeleniumHQ/selenium.git --depth 1` +3. Navigate into your clone `cd selenium/rust` +4. Build selenium `cargo build --release` +5. Set the following environment variable for the driver path `SE_MANAGER_PATH=~/selenium/rust/target/release/selenium-manager` +6. Put the driver you want in a location on your system PATH +7. Selenium will now use the built Selenium Manager to locate the manually downloaded driver on PATH ## Roadmap You can trace the work in progress in the [Selenium Manager project dashboard](https://github.com/orgs/SeleniumHQ/projects/5). Moreover, you can check the new features shipped with each Selenium Manager release in its [changelog file](https://github.com/SeleniumHQ/selenium/blob/trunk/rust/CHANGELOG.md). diff --git a/website_and_docs/content/documentation/webdriver/_index.en.md b/website_and_docs/content/documentation/webdriver/_index.en.md index 678e9ef5a180..4924f9fab727 100644 --- a/website_and_docs/content/documentation/webdriver/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/_index.en.md @@ -9,8 +9,8 @@ aliases: ["/documentation/en/webdriver/"] WebDriver drives a browser natively, as a user would, either locally -or on a remote machine using the Selenium server, -marks a leap forward in terms of browser automation. +or on a remote machine using the Selenium server. +It marks a leap forward in terms of browser automation. Selenium WebDriver refers to both the language bindings and the implementations of the individual browser controlling code. diff --git a/website_and_docs/content/documentation/webdriver/actions_api/mouse.en.md b/website_and_docs/content/documentation/webdriver/actions_api/mouse.en.md index 912517abaa43..a8932aaca1b0 100644 --- a/website_and_docs/content/documentation/webdriver/actions_api/mouse.en.md +++ b/website_and_docs/content/documentation/webdriver/actions_api/mouse.en.md @@ -25,7 +25,7 @@ This is useful for focusing a specific element: {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L22-L25" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L12-L15" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L14-L17" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L17-L20" >}} @@ -51,7 +51,7 @@ This is otherwise known as "clicking": {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L34-L37" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L24-L27" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L26-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L30-L33" >}} @@ -86,7 +86,7 @@ This is otherwise known as "right-clicking": {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L46-L49" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L35-L38" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L37-L40" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L43-L46" >}} @@ -112,7 +112,7 @@ There is no convenience method for this, it is just pressing and releasing mouse {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L49-L52" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L51-L54" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -141,7 +141,7 @@ There is no convenience method for this, it is just pressing and releasing mouse {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L63-L66" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L65-L68" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -169,7 +169,7 @@ This method combines moving to the center of an element with pressing and releas {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L93-L96" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L74-L77" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L91-L94" >}} @@ -196,7 +196,7 @@ Note that the element must be in the viewport or else the command will error. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L105-L108" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L85-L88" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L104-L107" >}} @@ -228,7 +228,7 @@ then moves by the provided offset. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L118-L121" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L96-L99" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L98-L101" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L132-L135" >}} @@ -254,7 +254,7 @@ offset. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L131-L136" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L108-L110" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L110-L112" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L146-L150" >}} @@ -286,7 +286,7 @@ the current mouse position. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L153-L155" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L124-L126" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L126-L128" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L167-L169" >}} @@ -312,7 +312,7 @@ moves to the location of the target element and then releases the mouse. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L166-L170" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L137-L141" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L139-L143" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L181-L185" >}} @@ -337,7 +337,7 @@ This method firstly performs a click-and-hold on the source element, moves to th {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L179-L184" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L149-L154" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L151-L156" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L195-L200" >}} diff --git a/website_and_docs/content/documentation/webdriver/actions_api/mouse.ja.md b/website_and_docs/content/documentation/webdriver/actions_api/mouse.ja.md index 66d25e2d8b75..17b06169391d 100644 --- a/website_and_docs/content/documentation/webdriver/actions_api/mouse.ja.md +++ b/website_and_docs/content/documentation/webdriver/actions_api/mouse.ja.md @@ -25,7 +25,7 @@ This is useful for focusing a specific element: {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L22-L25" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L12-L15" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L14-L17" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L17-L20" >}} @@ -51,7 +51,7 @@ This is otherwise known as "clicking": {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L34-L37" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L24-L27" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L26-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L30-L33" >}} @@ -86,7 +86,7 @@ This is otherwise known as "right-clicking": {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L46-L49" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L35-L38" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L37-L40" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L43-L46" >}} @@ -112,7 +112,7 @@ There is no convenience method for this, it is just pressing and releasing mouse {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L49-L52" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L51-L54" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -141,7 +141,7 @@ There is no convenience method for this, it is just pressing and releasing mouse {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L63-L66" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L65-L68" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -169,7 +169,7 @@ This method combines moving to the center of an element with pressing and releas {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L93-L96" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L74-L77" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L91-L94" >}} @@ -196,7 +196,7 @@ Note that the element must be in the viewport or else the command will error. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L105-L108" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L85-L88" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L104-L107" >}} @@ -228,7 +228,7 @@ then moves by the provided offset. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L118-L121" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L96-L99" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L98-L101" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L132-L135" >}} @@ -254,7 +254,7 @@ offset. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L131-L136" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L108-L110" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L110-L112" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L146-L150" >}} @@ -286,7 +286,7 @@ the current mouse position. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L153-L155" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L124-L126" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L126-L128" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L167-L169" >}} @@ -312,7 +312,7 @@ moves to the location of the target element and then releases the mouse. {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L166-L170" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L137-L141" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L139-L143" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L181-L185" >}} @@ -337,7 +337,7 @@ This method firstly performs a click-and-hold on the source element, moves to th {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L179-L184" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L149-L154" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L151-L156" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L195-L200" >}} diff --git a/website_and_docs/content/documentation/webdriver/actions_api/mouse.pt-br.md b/website_and_docs/content/documentation/webdriver/actions_api/mouse.pt-br.md index db6cc0c4d992..3faf08d59150 100644 --- a/website_and_docs/content/documentation/webdriver/actions_api/mouse.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/actions_api/mouse.pt-br.md @@ -22,7 +22,7 @@ Este método combina mover o mouse para o centro de um elemento com a pressão d {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L22-L25" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L12-L15" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L14-L17" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L17-L20" >}} @@ -47,7 +47,7 @@ Este método combina mover o mouse para o centro de um elemento com a pressão e {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L34-L37" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L24-L27" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L26-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L30-L33" >}} @@ -82,7 +82,7 @@ Este método combina mover o mouse para o centro de um elemento com a pressão e {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L46-L49" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L35-L38" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L37-L40" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L43-L46" >}} @@ -108,7 +108,7 @@ Este termo pode se referir a um clique com o botão X1 (botão de voltar) do mou {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L49-L52" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L51-L54" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -137,7 +137,7 @@ Este termo se refere a um clique com o botão X2 (botão de avançar) do mouse. {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L63-L66" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L65-L68" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -165,7 +165,7 @@ Este método combina mover o mouse para o centro de um elemento com a pressão e {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L93-L96" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L74-L77" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L91-L94" >}} @@ -190,7 +190,7 @@ Este método move o mouse para o ponto central do elemento que está visível na {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L105-L108" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L85-L88" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L104-L107" >}} @@ -219,7 +219,7 @@ Este método move o mouse para o ponto central do elemento visível na tela e, e {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L118-L121" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L96-L99" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L98-L101" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L132-L135" >}} @@ -244,7 +244,7 @@ Este método move o mouse a partir do canto superior esquerdo da janela de visua {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L131-L136" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L108-L110" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L110-L112" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L146-L150" >}} @@ -270,7 +270,7 @@ Observe que o primeiro argumento, X, especifica o movimento para a direita quand {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L153-L155" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L124-L126" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L126-L128" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L167-L169" >}} @@ -295,7 +295,7 @@ Este método primeiro realiza um clique e mantém pressionado no elemento de ori {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L166-L170" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L137-L141" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L139-L143" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L181-L185" >}} @@ -320,7 +320,7 @@ Este método primeiro realiza um clique e mantém pressionado no elemento de ori {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L179-L184" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L149-L154" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L151-L156" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L195-L200" >}} diff --git a/website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md b/website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md index aaf255bd7814..63748d0a108f 100644 --- a/website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md @@ -26,7 +26,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L22-L25" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L12-L15" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L14-L17" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L17-L20" >}} @@ -52,7 +52,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L34-L37" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L24-L27" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L26-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L30-L33" >}} @@ -87,7 +87,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L46-L49" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L35-L38" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L37-L40" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L43-L46" >}} @@ -113,7 +113,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L49-L52" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L51-L54" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -142,7 +142,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< /tab >}} {{< tab header="Python" >}} {{< badge-version version="4.2" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L63-L66" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L65-L68" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-version version="4.2" >}} @@ -170,7 +170,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L93-L96" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L74-L77" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L91-L94" >}} @@ -197,7 +197,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L105-L108" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L85-L88" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L104-L107" >}} @@ -227,7 +227,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L118-L121" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L96-L99" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L98-L101" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L132-L135" >}} @@ -252,7 +252,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L131-L136" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L108-L110" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L110-L112" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L146-L150" >}} @@ -281,7 +281,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L153-L155" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L124-L126" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L126-L128" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L167-L169" >}} @@ -306,7 +306,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L166-L170" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L137-L141" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L139-L143" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L181-L185" >}} @@ -330,7 +330,7 @@ Selenium组合了常见的操作并提供了方便的方法。 {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/actions_api/MouseTest.java#L179-L184" >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L149-L154" >}} +{{< gh-codeblock path="/examples/python/tests/actions_api/test_mouse.py#L151-L156" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/ActionsAPI/MouseTest.cs#L195-L200" >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.en.md b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.en.md index 6b82792f71df..b5ffc08db88b 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.en.md +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.en.md @@ -42,7 +42,7 @@ methods will eventually be removed when WebDriver BiDi implemented. {{< 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" >}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L10-L11" >}} {{% /tab %}} {{% tab header="CSharp" %}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} 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 index b721b93f9b3c..aad235f720dc 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/cdp/script.ja.md +++ b/website_and_docs/content/documentation/webdriver/bidi/cdp/script.ja.md @@ -51,7 +51,7 @@ methods will eventually be removed when WebDriver BiDi implemented. {{< 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" >}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L10-L11" >}} {{% /tab %}} {{% tab header="CSharp" %}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} 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 index 343170fe5404..bc76016f1eda 100644 --- 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 @@ -51,7 +51,7 @@ methods will eventually be removed when WebDriver BiDi implemented. {{< 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" >}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L10-L11" >}} {{% /tab %}} {{% tab header="CSharp" %}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} 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 index d7f287bd3dff..f4f25d5c09b0 100644 --- 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 @@ -51,7 +51,7 @@ methods will eventually be removed when WebDriver BiDi implemented. {{< 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" >}} +{{< gh-codeblock path="/examples/python/tests/bidi/cdp/test_script.py#L10-L11" >}} {{% /tab %}} {{% tab header="CSharp" %}} {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/CDP/ScriptTest.cs#L39-L46" >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.en.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.en.md index 8ae3eb9e6d02..8cd08ba25321 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.en.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.en.md @@ -16,7 +16,7 @@ Listen to the `console.log` events and register callbacks to process the event. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -36,7 +36,7 @@ and register callbacks to process the exception details. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -56,7 +56,7 @@ Listen to all JS logs at all levels and register callbacks to process the log. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.ja.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.ja.md index 7b94be6de2f8..4d4480e4f92c 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.ja.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.ja.md @@ -22,7 +22,7 @@ Listen to the `console.log` events and register callbacks to process the event. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -42,7 +42,7 @@ and register callbacks to process the exception details. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -62,7 +62,7 @@ Listen to all JS logs at all levels and register callbacks to process the log. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.pt-br.md index be0814eaa07a..739d7a2e68f2 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.pt-br.md @@ -22,7 +22,7 @@ Listen to the `console.log` events and register callbacks to process the event. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -42,7 +42,7 @@ and register callbacks to process the exception details. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} @@ -62,7 +62,7 @@ Listen to all JS logs at all levels and register callbacks to process the log. {{< tabpane text=true >}} {{< tab header="Java" >}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.zh-cn.md index 240ac370a900..fc02584fe050 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/log.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/log.zh-cn.md @@ -22,13 +22,13 @@ Listen to the `console.log` events and register callbacks to process the event. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L31-L38" >}} +{{< badge-version version="4.8" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L33-L39" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/javascript/test/bidirectional/logInspector.spec.js#L23-37" >}} {{< /tab >}} {{< tab header="Kotlin" >}} @@ -43,13 +43,12 @@ and register callbacks to process the exception details. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L70-L77" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L73-L78" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/javascript/test/bidirectional/logInspector.spec.js#L44-54" >}} {{< /tab >}} {{< tab header="Kotlin" >}} @@ -63,7 +62,8 @@ Listen to all JS logs at all levels and register callbacks to process the log. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L52-L59" >}} +{{< badge-version version="4.8" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/LogTest.java#L55-L60" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/chrome.en.md b/website_and_docs/content/documentation/webdriver/browsers/chrome.en.md index 1bae347db3d0..224c8bcbd3b5 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/chrome.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/chrome.en.md @@ -370,11 +370,11 @@ You can drive Chrome Cast devices, including sharing tabs {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L230-L235" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -396,11 +396,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L204-L210" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -419,11 +419,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L247" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -442,11 +442,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L189" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/chrome.ja.md b/website_and_docs/content/documentation/webdriver/browsers/chrome.ja.md index c64e787ea697..2949c39cf827 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/chrome.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/chrome.ja.md @@ -363,11 +363,11 @@ Chrome Castデバイスを操作することができ、タブの共有も含ま {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L230-L235" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -390,11 +390,11 @@ Chrome Castデバイスを操作することができ、タブの共有も含ま {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L204-L210" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -413,11 +413,11 @@ Chrome Castデバイスを操作することができ、タブの共有も含ま {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L247" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -436,11 +436,11 @@ Chrome Castデバイスを操作することができ、タブの共有も含ま {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L189" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/chrome.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/chrome.pt-br.md index 29e7473eefae..ad5a7234b3d0 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/chrome.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/chrome.pt-br.md @@ -370,11 +370,11 @@ Pode comandar dispositivos Chrome Cast, incluindo partilhar abas {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L230-L235" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -399,11 +399,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L204-L210" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -422,11 +422,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L247" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -445,11 +445,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L189" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md index 67212c605e65..44882a2a3f57 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md @@ -371,12 +371,11 @@ Chromedriver 和 Chrome 浏览器版本应该匹配, 如果它们不匹配, 驱 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L230-L235" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} -{{< tab header="CSharp" >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L170-L174" >}} +{{< /tab >}}{{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} @@ -400,11 +399,11 @@ Chromedriver 和 Chrome 浏览器版本应该匹配, 如果它们不匹配, 驱 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L204-L210" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -423,11 +422,11 @@ Chromedriver 和 Chrome 浏览器版本应该匹配, 如果它们不匹配, 驱 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L247" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -446,11 +445,11 @@ Chromedriver 和 Chrome 浏览器版本应该匹配, 如果它们不匹配, 驱 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java#L189" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/edge.en.md b/website_and_docs/content/documentation/webdriver/browsers/edge.en.md index 5964af0fefb5..bbbe526fa5de 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/edge.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/edge.en.md @@ -20,7 +20,7 @@ Starting an Edge session with basic defined options looks like this: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L37-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L38-L39" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L9-L10" >}} @@ -52,7 +52,7 @@ Add an argument to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L45" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L46" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L18" >}} @@ -80,7 +80,7 @@ Add a browser location to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L54" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L55" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L29">}} @@ -109,7 +109,7 @@ Add an extension to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L65" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L66" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L40" >}} @@ -166,7 +166,7 @@ Set excluded arguments on options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L78" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L79" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L62" >}} @@ -178,7 +178,7 @@ Set excluded arguments on options: {{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L53" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L20-L23">}} +{{< gh-codeblock path="/examples/javascript/test/browser/edgeSpecificCaps.spec.js#L22">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -203,7 +203,7 @@ To change the logging output to save to a specific file: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L100" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L101" >}} **Note**: Java also allows setting file output by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: String representing path to log file @@ -233,13 +233,14 @@ To change the logging output to display in the console as STDOUT: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L113" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L114" >}} **Note**: Java also allows setting console output by System Property;\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} {{< tab header="Python" >}} -{{< badge-implementation >}} +{{< badge-version version="4.11" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_edge.py#L82" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -265,7 +266,7 @@ so this example is just setting the log level generically: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L126-L127" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L127-L128" >}} **Note**: Java also allows setting log level by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY`\ Property value: String representation of `ChromiumDriverLogLevel` enum @@ -299,7 +300,7 @@ The log output will be managed by the driver, not the process, so minor differen {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L142-L143" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L143-L144" >}} **Note**: Java also allows toggling these features by System Property:\ Property keys: `EdgeDriverService.EDGE_DRIVER_APPEND_LOG_PROPERTY` and `EdgeDriverService.EDGE_DRIVER_READABLE_TIMESTAMP`\ Property value: `"true"` or `"false"` @@ -331,7 +332,7 @@ Note that this is an unsupported feature, and bugs will not be investigated. {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L160-L161" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L161-L162" >}} **Note**: Java also allows disabling build checks by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_DISABLE_BUILD_CHECK`\ Property value: `"true"` or `"false"` @@ -371,11 +372,11 @@ You can drive Chrome Cast devices with Edge, including sharing tabs {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L225-L230" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -396,11 +397,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L198-L204" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -419,11 +420,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L242" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -442,11 +443,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L184" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/edge.ja.md b/website_and_docs/content/documentation/webdriver/browsers/edge.ja.md index fb462010145c..2442ba4d41bd 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/edge.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/edge.ja.md @@ -21,7 +21,7 @@ Chromiumに特有の機能は、Googleの[Capabilities & ChromeOptions](https:// {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L37-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L38-L38" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L9-L10" >}} @@ -52,7 +52,7 @@ Chromiumに特有の機能は、Googleの[Capabilities & ChromeOptions](https:// {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L45" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L46" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L18" >}} @@ -79,7 +79,7 @@ Chromiumに特有の機能は、Googleの[Capabilities & ChromeOptions](https:// {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L54" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L55" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L29">}} @@ -106,7 +106,7 @@ Chromiumに特有の機能は、Googleの[Capabilities & ChromeOptions](https:// {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L65" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L66" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L40" >}} @@ -158,7 +158,7 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L78" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L79" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L62" >}} @@ -170,7 +170,7 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L53" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L20-L23">}} +{{< gh-codeblock path="/examples/javascript/test/browser/edgeSpecificCaps.spec.js#L22">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -193,7 +193,7 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L100" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L101" >}} **注意**: Javaでもシステムプロパティを使用してファイル出力を設定できます:\ プロパティキー: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ プロパティ値: ログファイルのパスを表す文字列 @@ -223,13 +223,14 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L113" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L114" >}} **注**: Javaでは、システムプロパティを使用してコンソール出力を設定することもできます。\ プロパティキー: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ プロパティ値:`DriverService.LOG_STDOUT` または `DriverService.LOG_STDERR` {{% /tab %}} {{< tab header="Python" >}} -{{< badge-implementation >}} +{{< badge-version version="4.11" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_edge.py#L82" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -253,7 +254,7 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L126-L127" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L127-L128" >}} **注意**: Javaでは、システムプロパティを使用してログレベルを設定することもできます:\ プロパティキー: `EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY`\ プロパティ値:`ChromiumDriverLogLevel` 列挙型の文字列表現 @@ -286,7 +287,7 @@ MSEdgedriverには、ブラウザを起動するために使用されるいく {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L142-L143" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L143-L144" >}} **注意**: Javaでは、これらの機能をSystem Propertyによって切り替えることもできます:\ プロパティキー:`EdgeDriverService.EDGE_DRIVER_APPEND_LOG_PROPERTY` および `EdgeDriverService.EDGE_DRIVER_READABLE_TIMESTAMP`\ プロパティ値: `"true"` または `"false"` @@ -317,7 +318,7 @@ Edge ブラウザとmsedgedriverのバージョンは一致する必要があり {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L160-L161" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L161-L162" >}} **注**: Javaでは、システムプロパティを使用してビルドチェックを無効にすることもできます:\ プロパティキー:`EdgeDriverService.EDGE_DRIVER_DISABLE_BUILD_CHECK`\ プロパティ値: `"true"` または `"false"` @@ -357,11 +358,11 @@ Edge を使用して Chrome Cast デバイスを操作し、タブを共有す {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L225-L230" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -382,11 +383,11 @@ Edge を使用して Chrome Cast デバイスを操作し、タブを共有す {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L198-L204" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -405,11 +406,11 @@ Edge を使用して Chrome Cast デバイスを操作し、タブを共有す {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L242" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -428,11 +429,11 @@ Edge を使用して Chrome Cast デバイスを操作し、タブを共有す {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L184" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md index c28ba3067a6c..c2a5d283bae3 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md @@ -22,7 +22,7 @@ Este é um exemplo de como iniciar uma sessão Edge com um conjunto de opções {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L37-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L38-L39" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L9-L10" >}} @@ -54,7 +54,7 @@ Adicione uma opção: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L45" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L46" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L18" >}} @@ -111,7 +111,7 @@ Add an extension to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L65" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L66" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L40" >}} @@ -168,7 +168,7 @@ Set excluded arguments on options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L78" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L79" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L62" >}} @@ -180,7 +180,7 @@ Set excluded arguments on options: {{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L53" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L20-L23">}} +{{< gh-codeblock path="/examples/javascript/test/browser/edgeSpecificCaps.spec.js#L22">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -205,7 +205,7 @@ To change the logging output to save to a specific file: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L100" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L101" >}} **Note**: Java also allows setting file output by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: String representing path to log file @@ -235,13 +235,14 @@ To change the logging output to display in the console as STDOUT: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L113" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L114" >}} **Note**: Java also allows setting console output by System Property;\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} {{< tab header="Python" >}} -{{< badge-implementation >}} +{{< badge-version version="4.11" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_edge.py#L82" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -267,7 +268,7 @@ so this example is just setting the log level generically: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L126-L127" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L127-L128" >}} **Note**: Java also allows setting log level by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY`\ Property value: String representation of `ChromiumDriverLogLevel` enum @@ -301,7 +302,7 @@ The log output will be managed by the driver, not the process, so minor differen {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L142-L143" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L143-L144" >}} **Note**: Java also allows toggling these features by System Property:\ Property keys: `EdgeDriverService.EDGE_DRIVER_APPEND_LOG_PROPERTY` and `EdgeDriverService.EDGE_DRIVER_READABLE_TIMESTAMP`\ Property value: `"true"` or `"false"` @@ -333,7 +334,7 @@ Note that this is an unsupported feature, and bugs will not be investigated. {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L160-L161" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L161-L162" >}} **Note**: Java also allows disabling build checks by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_DISABLE_BUILD_CHECK`\ Property value: `"true"` or `"false"` @@ -373,11 +374,11 @@ You can drive Chrome Cast devices with Edge, including sharing tabs {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L225-L230" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -398,11 +399,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L198-L204" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -421,11 +422,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L242" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -444,11 +445,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L184" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md index b8966197efdc..a78ced964fb7 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md @@ -22,7 +22,7 @@ Capabilities unique to Chromium are documented at Google's page for {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L37-L38" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L38-L39" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L9-L10" >}} @@ -54,7 +54,7 @@ Add an argument to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L45" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L46" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L18" >}} @@ -82,7 +82,7 @@ Add a browser location to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L54" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L55" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L29">}} @@ -111,7 +111,7 @@ Add an extension to options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L65" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L66" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L40" >}} @@ -168,7 +168,7 @@ Set excluded arguments on options: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L78" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L79" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L62" >}} @@ -180,7 +180,7 @@ Set excluded arguments on options: {{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L53" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L20-L23">}} +{{< gh-codeblock path="/examples/javascript/test/browser/edgeSpecificCaps.spec.js#L22">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -205,7 +205,7 @@ To change the logging output to save to a specific file: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L100" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L101" >}} **Note**: Java also allows setting file output by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: String representing path to log file @@ -235,13 +235,14 @@ To change the logging output to display in the console as STDOUT: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L113" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L114" >}} **Note**: Java also allows setting console output by System Property;\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} {{< tab header="Python" >}} -{{< badge-implementation >}} +{{< badge-version version="4.11" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_edge.py#L82" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -267,7 +268,7 @@ so this example is just setting the log level generically: {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L126-L127" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L127-L128" >}} **Note**: Java also allows setting log level by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY`\ Property value: String representation of `ChromiumDriverLogLevel` enum @@ -301,7 +302,7 @@ The log output will be managed by the driver, not the process, so minor differen {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L142-L143" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L143-L144" >}} **Note**: Java also allows toggling these features by System Property:\ Property keys: `EdgeDriverService.EDGE_DRIVER_APPEND_LOG_PROPERTY` and `EdgeDriverService.EDGE_DRIVER_READABLE_TIMESTAMP`\ Property value: `"true"` or `"false"` @@ -333,7 +334,7 @@ Note that this is an unsupported feature, and bugs will not be investigated. {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.8" >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L160-L161" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L161-L162" >}} **Note**: Java also allows disabling build checks by System Property:\ Property key: `EdgeDriverService.EDGE_DRIVER_DISABLE_BUILD_CHECK`\ Property value: `"true"` or `"false"` @@ -373,11 +374,11 @@ You can drive Chrome Cast devices with Edge, including sharing tabs {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L225-L230" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L170-L174" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -398,11 +399,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L198-L204" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -421,11 +422,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L242" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L186" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -444,11 +445,11 @@ You can simulate various network conditions. {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L184" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L149" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md index bbf2534b85f8..e38174e824e5 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md @@ -61,7 +61,7 @@ Add an argument to options: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L17" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12-L14">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -102,20 +102,12 @@ There are several ways to work with Firefox profiles. {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -FirefoxProfile profile = new FirefoxProfile(); -FirefoxOptions options = new FirefoxOptions(); -options.setProfile(profile); -driver = new FirefoxDriver(options); - {{< /tab >}} - {{< tab header="Python" >}} -from selenium.webdriver.firefox.options import Options -from selenium.webdriver.firefox.firefox_profile import FirefoxProfile -options=Options() -firefox_profile = FirefoxProfile() -firefox_profile.set_preference("javascript.enabled", False) -options.profile = firefox_profile - {{< /tab >}} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}} +{{< /tab >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}} +{{< /tab >}} {{< tab header="CSharp" >}} var options = new FirefoxOptions(); var profile = new FirefoxProfile(); @@ -332,7 +324,7 @@ A signed xpi file you would get from [Mozilla Addon page](https://addons.mozilla {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L132" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L133" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L94" >}} @@ -344,7 +336,7 @@ A signed xpi file you would get from [Mozilla Addon page](https://addons.mozilla {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L95" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L22-L24">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -357,7 +349,7 @@ Uninstalling an addon requires knowing its id. The id can be obtained from the r {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L146" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L148" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L106" >}} @@ -370,7 +362,7 @@ Uninstalling an addon requires knowing its id. The id can be obtained from the r {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L106" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L26">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -385,7 +377,7 @@ example with a directory: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L157" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L160" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L115" >}} @@ -399,7 +391,7 @@ example with a directory: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L115" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L36-L38">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L41">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -414,11 +406,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L181" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -441,11 +433,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md index 9932d9fa801a..664ab91d6bf6 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md @@ -64,7 +64,7 @@ Firefox に固有のCapabilityは、Mozilla のページの [firefoxOptions](htt {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L17" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12-L14">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -106,21 +106,13 @@ Firefoxプロファイルを操作するにはいくつかの方法がありま
{{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -FirefoxProfile profile = new FirefoxProfile(); -FirefoxOptions options = new FirefoxOptions(); -options.setProfile(profile); -driver = new RemoteWebDriver(options); - {{< /tab >}} - {{< tab header="Python" >}} -from selenium.webdriver.firefox.options import Options -from selenium.webdriver.firefox.firefox_profile import FirefoxProfile -options=Options() -firefox_profile = FirefoxProfile() -firefox_profile.set_preference("javascript.enabled", False) -options.profile = firefox_profile - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}} +{{< /tab >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}} +{{< /tab >}} +{{< tab header="CSharp" >}} var options = new FirefoxOptions(); var profile = new FirefoxProfile(); options.Profile = profile; @@ -331,7 +323,7 @@ T以下の例はローカルWebDriver用です。リモートWebDriverについ {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L132" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L133" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L94" >}} @@ -343,7 +335,7 @@ T以下の例はローカルWebDriver用です。リモートWebDriverについ {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L95" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L22-L24">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -357,7 +349,7 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L146" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L148" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L106" >}} @@ -370,7 +362,7 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L106" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L26">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -385,7 +377,7 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L157" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L160" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L115" >}} @@ -399,7 +391,7 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L115" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L36-L38">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L41">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -412,11 +404,11 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L181" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -437,11 +429,11 @@ IDはアドオンインストール時の戻り値から取得できます。 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md index aebb96a26145..0603016ae1d2 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md @@ -63,7 +63,7 @@ Adicione uma opção: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L17" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12-L14">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -105,20 +105,12 @@ Existem várias formas de trabalhar com perfis Firefox
{{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -FirefoxProfile profile = new FirefoxProfile(); -FirefoxOptions options = new FirefoxOptions(); -options.setProfile(profile); -driver = new RemoteWebDriver(options); - {{< /tab >}} - {{< tab header="Python" >}} -from selenium.webdriver.firefox.options import Options -from selenium.webdriver.firefox.firefox_profile import FirefoxProfile -options=Options() -firefox_profile = FirefoxProfile() -firefox_profile.set_preference("javascript.enabled", False) -options.profile = firefox_profile - {{< /tab >}} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}} +{{< /tab >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}} +{{< /tab >}} {{< tab header="CSharp" >}} var options = new FirefoxOptions(); var profile = new FirefoxProfile(); @@ -337,7 +329,7 @@ Um arquivo xpi que pode ser obtido da [página Mozilla Extras](https://addons.mo {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L132" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L133" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L94" >}} @@ -349,7 +341,7 @@ Um arquivo xpi que pode ser obtido da [página Mozilla Extras](https://addons.mo {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L95" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L22-L24">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -362,7 +354,7 @@ Desinstalar uma extensão implica saber o seu id que pode ser obtido como valor {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L146" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L148" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L106" >}} @@ -375,7 +367,7 @@ Desinstalar uma extensão implica saber o seu id que pode ser obtido como valor {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L106" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L26">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -390,7 +382,7 @@ uma pasta, este é um exemplo com uma pasta: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L157" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L160" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L115" >}} @@ -404,7 +396,7 @@ uma pasta, este é um exemplo com uma pasta: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L115" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L36-L38">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L41">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -419,11 +411,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L181" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -446,11 +438,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md index 87b9e259a869..d1384cebc591 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md @@ -63,7 +63,7 @@ Add an argument to options: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L17" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12-L14">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L12">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -104,20 +104,12 @@ There are several ways to work with Firefox profiles
{{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -FirefoxProfile profile = new FirefoxProfile(); -FirefoxOptions options = new FirefoxOptions(); -options.setProfile(profile); -driver = new RemoteWebDriver(options); - {{< /tab >}} - {{< tab header="Python" >}} -from selenium.webdriver.firefox.options import Options -from selenium.webdriver.firefox.firefox_profile import FirefoxProfile -options=Options() -firefox_profile = FirefoxProfile() -firefox_profile.set_preference("javascript.enabled", False) -options.profile = firefox_profile - {{< /tab >}} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}} +{{< /tab >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}} +{{< /tab >}} {{< tab header="CSharp" >}} var options = new FirefoxOptions(); var profile = new FirefoxProfile(); @@ -334,7 +326,7 @@ A signed xpi file you would get from [Mozilla Addon page](https://addons.mozilla {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L132" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L133" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L94" >}} @@ -346,7 +338,7 @@ A signed xpi file you would get from [Mozilla Addon page](https://addons.mozilla {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L95" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L22-L24">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -359,7 +351,7 @@ Uninstalling an addon requires knowing its id. The id can be obtained from the r {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L146" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L148" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L106" >}} @@ -372,7 +364,7 @@ Uninstalling an addon requires knowing its id. The id can be obtained from the r {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L106" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L25">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L26">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -387,7 +379,7 @@ example with a directory: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L157" >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L160" >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L115" >}} @@ -401,7 +393,7 @@ example with a directory: {{< gh-codeblock path="/examples/ruby/spec/browsers/firefox_spec.rb#L115" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L36-L38">}} +{{< gh-codeblock path="/examples/javascript/test/browser/firefoxSpecificFunctionalities.spec.js#L41">}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -416,11 +408,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L181" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} @@ -443,11 +435,11 @@ please refer to the {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}} +{{< /tab >}} +{{< tab header="Python" >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}} {{< /tab >}} -{{% tab header="Python" %}} -{{< badge-code >}} -{{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} {{< /tab >}} 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 764fc8434308..af3c5f2d3feb 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 @@ -97,16 +97,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.waitForUploadDialogUpTo(Duration.ofSeconds(2)); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.file_upload_dialog_timeout = 2000 -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L28-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -150,16 +142,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.destructivelyEnsureCleanSession(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ensure_clean_session = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L38-L39" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -198,16 +182,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.ignoreZoomSettings(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_zoom_level = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L48-L49" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -256,16 +232,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.introduceFlakinessByIgnoringSecurityDomains(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_protected_mode_settings = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L58-L59" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -303,16 +271,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.setCapability("silent", true); WebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.set_capability("silent", True) -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L68-L69" >}} {{< /tab >}} {{< tab header="CSharp" >}} InternetExplorerOptions options = new InternetExplorerOptions(); @@ -400,17 +360,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.add_argument('-private') -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -495,16 +446,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -575,8 +518,8 @@ To change the logging output to save to a specific file: Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: String representing path to log file {{% /tab %}} -{{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L29" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L97-L99" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -605,9 +548,9 @@ To change the logging output to display in the console as STDOUT: Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L41" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L109-L111" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -635,8 +578,8 @@ If logging output is specified, the default level is `FATAL` Property key: `InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY`\ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.toString()` enum {{% /tab %}} -{{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L53" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L121-L123" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L85" >}} @@ -662,9 +605,9 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t Property key: `InternetExplorerDriverService.IE_DRIVER_EXTRACT_PATH_PROPERTY`\ Property value: String representing path to supporting files directory {{< /tab >}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L65" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L133-L135" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L98" >}} 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 f70ca13ed7ad..649a36c98d17 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 @@ -94,16 +94,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.waitForUploadDialogUpTo(Duration.ofSeconds(2)); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.file_upload_dialog_timeout = 2000 -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L28-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -144,16 +136,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.destructivelyEnsureCleanSession(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ensure_clean_session = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L38-L39" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -191,16 +175,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.ignoreZoomSettings(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_zoom_level = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L48-L49" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -245,16 +221,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.introduceFlakinessByIgnoringSecurityDomains(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_protected_mode_settings = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L58-L59" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -290,16 +258,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.setCapability("silent", true); WebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.set_capability("silent", True) -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L68-L69" >}} {{< /tab >}} {{< tab header="CSharp" >}} InternetExplorerOptions options = new InternetExplorerOptions(); @@ -387,17 +347,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.add_argument('-private') -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -480,16 +431,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -564,7 +507,7 @@ Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: String representing path to log file {{% /tab %}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L29" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L97-L99" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -593,9 +536,9 @@ To change the logging output to display in the console as STDOUT: Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L41" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L109-L111" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -623,8 +566,8 @@ If logging output is specified, the default level is `FATAL` Property key: `InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY`\ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.toString()` enum {{% /tab %}} -{{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L53" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L121-L123" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L85" >}} @@ -650,9 +593,9 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t Property key: `InternetExplorerDriverService.IE_DRIVER_EXTRACT_PATH_PROPERTY`\ Property value: String representing path to supporting files directory {{< /tab >}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L65" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L133-L135" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L98" >}} 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 666f21eb042f..07f7b0909646 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 @@ -97,17 +97,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.waitForUploadDialogUpTo(Duration.ofSeconds(2)); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.file_upload_dialog_timeout = 2000 -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L28-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -150,17 +141,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.destructivelyEnsureCleanSession(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ensure_clean_session = True -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L38-L39" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -198,17 +180,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.ignoreZoomSettings(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_zoom_level = True -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L48-L49" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -256,17 +229,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.introduceFlakinessByIgnoringSecurityDomains(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_protected_mode_settings = True -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L58-L59" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -303,17 +267,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.setCapability("silent", true); WebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.set_capability("silent", True) -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L68-L69" >}} {{< /tab >}} {{< tab header="CSharp" >}} InternetExplorerOptions options = new InternetExplorerOptions(); @@ -400,18 +355,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.add_argument('-private') -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -495,17 +440,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -# Navegar para Url -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -579,7 +515,7 @@ Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: String representing path to log file {{% /tab %}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L29" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L97-L99" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -608,9 +544,9 @@ To change the logging output to display in the console as STDOUT: Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L41" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L109-L111" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -638,8 +574,8 @@ If logging output is specified, the default level is `FATAL` Property key: `InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY`\ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.toString()` enum {{% /tab %}} -{{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L53" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L121-123" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L85" >}} @@ -665,9 +601,9 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t Property key: `InternetExplorerDriverService.IE_DRIVER_EXTRACT_PATH_PROPERTY`\ Property value: String representing path to supporting files directory {{< /tab >}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L65" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L133-135" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L98" >}} 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 9f09e64c2437..80b16de42e2c 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 @@ -94,16 +94,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.waitForUploadDialogUpTo(Duration.ofSeconds(2)); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.file_upload_dialog_timeout = 2000 -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L28-L29" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -146,16 +138,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.destructivelyEnsureCleanSession(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ensure_clean_session = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L38-L39" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -194,16 +178,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.ignoreZoomSettings(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_zoom_level = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L48-L49" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -251,16 +227,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.introduceFlakinessByIgnoringSecurityDomains(); WebDriver driver = new RemoteWebDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.ignore_protected_mode_settings = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L58-L59" >}} {{< /tab >}} {{< tab header="CSharp" >}} var options = new InternetExplorerOptions(); @@ -297,16 +265,8 @@ InternetExplorerOptions options = new InternetExplorerOptions(); options.setCapability("silent", true); WebDriver driver = new InternetExplorerDriver(options); {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.set_capability("silent", True) -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L68-L69" >}} {{< /tab >}} {{< tab header="CSharp" >}} InternetExplorerOptions options = new InternetExplorerOptions(); @@ -397,17 +357,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.add_argument('-private') -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L76-L79" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -491,16 +442,8 @@ public class ieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -options = webdriver.IeOptions() -options.force_create_process_api = True -driver = webdriver.Ie(options=options) - -driver.get("http://www.google.com") - -driver.quit() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L87-L90" >}} {{< /tab >}} {{< tab header="CSharp" >}} using System; @@ -574,7 +517,7 @@ Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: String representing path to log file {{% /tab %}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L29" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L97-L99" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -603,9 +546,9 @@ To change the logging output to display in the console as STDOUT: Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\ Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR` {{% /tab %}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L41" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L109-L111" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< badge-implementation >}} @@ -633,8 +576,8 @@ If logging output is specified, the default level is `FATAL` Property key: `InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY`\ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.toString()` enum {{% /tab %}} -{{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L53" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L121-L123" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L85" >}} @@ -660,9 +603,9 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t Property key: `InternetExplorerDriverService.IE_DRIVER_EXTRACT_PATH_PROPERTY`\ Property value: String representing path to supporting files directory {{< /tab >}} -{{< tab header="Python" >}} +{{< tab header="Python" text=true >}} {{< badge-version version="4.11" >}} -{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L65" >}} +{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L133-L135" >}} {{< /tab >}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L98" >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.en.md b/website_and_docs/content/documentation/webdriver/browsers/safari.en.md index d54f928d2580..757b9cd1b066 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.en.md @@ -39,7 +39,7 @@ Starting a Safari session with basic defined options looks like this: {{< gh-codeblock path="/examples/ruby/spec/browsers/safari_spec.rb#L8-L9" >}} {{< /tab >}} {{< tab header="JavaScript" text=true >}} -{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L10-L12" >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L8-L11" >}} {{< /tab >}} {{< tab header="Kotlin" >}} val options = SafariOptions() @@ -93,7 +93,7 @@ Apple provides a development version of their browser — [Safari Technology Pre {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/SafariTest.java#L39-L40" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/browsers/test_safari.py#L25-L30" >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md b/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md index 86a427ecbff6..a15036dab0b3 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md @@ -38,7 +38,7 @@ Starting a Safari session with basic defined options looks like this: {{< gh-codeblock path="/examples/ruby/spec/browsers/safari_spec.rb#L8-L9" >}} {{< /tab >}} {{< tab header="JavaScript" text=true >}} -{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L10-L12" >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L8-L11" >}} {{< /tab >}} {{< tab header="Kotlin" >}} val options = SafariOptions() @@ -93,7 +93,7 @@ To use this version in your code: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/SafariTest.java#L39-L40" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/browsers/test_safari.py#L25-L30" >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md index 7def4aa1c493..0ef447205626 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.pt-br.md @@ -38,7 +38,7 @@ Este é um exemplo de como iniciar uma sessão Safari com um conjunto de opçõe {{< gh-codeblock path="/examples/ruby/spec/browsers/safari_spec.rb#L8-L9" >}} {{< /tab >}} {{< tab header="JavaScript" text=true >}} -{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L10-L12" >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L8-L11" >}} {{< /tab >}} {{< tab header="Kotlin" >}} val options = SafariOptions() @@ -93,7 +93,7 @@ To use this version in your code: {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/SafariTest.java#L39-L40" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/browsers/test_safari.py#L25-L30" >}} diff --git a/website_and_docs/content/documentation/webdriver/browsers/safari.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/safari.zh-cn.md index 07b63b1543b4..d55da00b60b2 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.zh-cn.md @@ -38,7 +38,7 @@ Safari独有的Capabilities可以在Apple的页面[关于Safari的WebDriver](htt {{< gh-codeblock path="/examples/ruby/spec/browsers/safari_spec.rb#L8-L9" >}} {{< /tab >}} {{< tab header="JavaScript" text=true >}} -{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L10-L12" >}} +{{< gh-codeblock path="/examples/javascript/test/browser/safariSpecificCap.spec.js#L8-L11" >}} {{< /tab >}} {{< tab header="Kotlin" >}} val options = SafariOptions() @@ -97,7 +97,7 @@ Apple 提供了其浏览器的开发版本 — [Safari Technology Preview](https {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/SafariTest.java#L39-L40" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/browsers/test_safari.py#L25-L30" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md index 0743dd8be659..991bdc15fc56 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md @@ -32,7 +32,7 @@ on the local machine. {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md index 4ee79fdd488a..b7602f6e607d 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md @@ -29,7 +29,7 @@ weight: 3 {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md index 0addfe19520c..e5e3beae0541 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md @@ -32,7 +32,7 @@ on the local machine. {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md index 129503e2a9d7..09d36622ecbe 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md @@ -30,7 +30,7 @@ weight: 3 {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/http_client.en.md b/website_and_docs/content/documentation/webdriver/drivers/http_client.en.md index ce95a52a78c9..4f537b6270ef 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/http_client.en.md +++ b/website_and_docs/content/documentation/webdriver/drivers/http_client.en.md @@ -8,10 +8,10 @@ These allow you to set various parameters for the HTTP library {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_http_client.py" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/http_client.ja.md b/website_and_docs/content/documentation/webdriver/drivers/http_client.ja.md index 165e79efa0bc..436a4a52d283 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/http_client.ja.md +++ b/website_and_docs/content/documentation/webdriver/drivers/http_client.ja.md @@ -8,10 +8,10 @@ weight: 3 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_http_client.py" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/http_client.pt-br.md b/website_and_docs/content/documentation/webdriver/drivers/http_client.pt-br.md index ce95a52a78c9..4f537b6270ef 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/http_client.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/drivers/http_client.pt-br.md @@ -8,10 +8,10 @@ These allow you to set various parameters for the HTTP library {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_http_client.py" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/http_client.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/http_client.zh-cn.md index 667574dcb3b3..6f3ba9f8fcd0 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/http_client.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/http_client.zh-cn.md @@ -8,10 +8,10 @@ weight: 3 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java" >}} {{< /tab >}} {{% tab header="Python" %}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/drivers/test_http_client.py" >}} {{% /tab %}} {{< tab header="CSharp" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/information.en.md b/website_and_docs/content/documentation/webdriver/elements/information.en.md index 96360d54cfaa..cc456c78bdcd 100644 --- a/website_and_docs/content/documentation/webdriver/elements/information.en.md +++ b/website_and_docs/content/documentation/webdriver/elements/information.en.md @@ -29,14 +29,10 @@ nature and relationship in the tree to return a value. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}} {{< /tab >}} -{{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Get boolean value for is element display -is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L12-L15" >}} {{< /tab >}} -{{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -68,14 +64,10 @@ Returns a boolean value, **True** if the connected element is {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is enabled else returns false -value = driver.find_element(By.NAME, 'button_input').is_enabled() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L19" >}} {{< /tab >}} - {{< tab header="CSharp" >}} + {{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -106,14 +98,10 @@ Returns a boolean value, **True** if referenced element is {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is checked else returns false -value = driver.find_element(By.NAME, "checkbox_input").is_selected() + {{< tab header="Python" text=true >}} + {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L23" >}} {{< /tab >}} - {{< tab header="CSharp" >}} + {{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -140,14 +128,10 @@ of the referenced Element which has the focus in the current browsing context. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns TagName of the element -attr = driver.find_element(By.NAME, "email_input").tag_name + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L27" >}} {{< /tab >}} - {{< tab header="CSharp" >}} + {{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -180,14 +164,10 @@ The fetched data body contain the following details: {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns height, width, x and y coordinates referenced element -res = driver.find_element(By.NAME, "range_input").rect + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L31" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -217,15 +197,10 @@ of an element in the current browsing context. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to Url -driver.get('https://www.selenium.dev/selenium/web/colorPage.html') - - # Retrieves the computed style property 'color' of linktext -cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color') + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L35-L37" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -253,14 +228,10 @@ Retrieves the rendered text of the specified element. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/linked_image.html") - - # Retrieves the text of the element -text = driver.find_element(By.ID, "justanotherlink").text + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L41" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -290,17 +261,10 @@ with the DOM attribute or property of the element. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}} {{< /tab >}} - {{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Identify the email text box -email_txt = driver.find_element(By.NAME, "email_input") - -# Fetch the value property associated with the textbox -value_info = email_txt.get_attribute("value") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L44-L46" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/information.ja.md b/website_and_docs/content/documentation/webdriver/elements/information.ja.md index e01f1f986619..70b5d3d18153 100644 --- a/website_and_docs/content/documentation/webdriver/elements/information.ja.md +++ b/website_and_docs/content/documentation/webdriver/elements/information.ja.md @@ -29,14 +29,10 @@ nature and relationship in the tree to return a value. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}} {{< /tab >}} -{{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Get boolean value for is element display -is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L12-L15" >}} {{< /tab >}} -{{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -46,11 +42,13 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}} {{< /tab >}} {{< tab header="Kotlin" >}} + //navigates to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns true if element is displayed else returns false + //returns true if element is displayed else returns false val flag = driver.findElement(By.name("email_input")).isDisplayed() + {{< /tab >}} {{< /tabpane >}} @@ -65,14 +63,10 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is enabled else returns false -value = driver.find_element(By.NAME, 'button_input').is_enabled() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L19" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -80,14 +74,14 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled() {{< /tab >}} {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}} -{{< /tab >}} - {{< tab header="Kotlin" >}} +{{< /tab >}} +{{< tab header="Kotlin" >}} //navigates to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns true if element is enabled else returns false + //returns true if element is enabled else returns false val attr = driver.findElement(By.name("button_input")).isEnabled() - {{< /tab >}} + {{< /tab >}} {{< /tabpane >}} ## 要素が選択されているかどうか @@ -101,14 +95,10 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is checked else returns false -value = driver.find_element(By.NAME, "checkbox_input").is_selected() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L23" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -117,13 +107,13 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected() {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns true if element is checked else returns false - val attr = driver.findElement(By.name("checkbox_input")).isSelected() - {{< /tab >}} +//returns true if element is checked else returns false +val attr = driver.findElement(By.name("checkbox_input")).isSelected() +{{< /tab >}} {{< /tabpane >}} ## 要素のタグ名を取得 @@ -135,14 +125,10 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns TagName of the element -attr = driver.find_element(By.NAME, "email_input").tag_name - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L27" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -151,13 +137,13 @@ attr = driver.find_element(By.NAME, "email_input").tag_name {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns TagName of the element - val attr = driver.findElement(By.name("email_input")).getTagName() - {{< /tab >}} +//returns TagName of the element +val attr = driver.findElement(By.name("email_input")).getTagName() +{{< /tab >}} {{< /tabpane >}} ## 要素矩形を取得 @@ -175,14 +161,10 @@ attr = driver.find_element(By.NAME, "email_input").tag_name {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns height, width, x and y coordinates referenced element -res = driver.find_element(By.NAME, "range_input").rect + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L31" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -191,7 +173,7 @@ res = driver.find_element(By.NAME, "range_input").rect {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L45">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} // Navigate to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") @@ -211,52 +193,39 @@ println(res.getX()) {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to Url -driver.get('https://www.selenium.dev/selenium/web/colorPage.html') - - # Retrieves the computed style property 'color' of linktext -cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color') - - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L35-L37" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}} {{< /tab >}} - {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} - {{< /tab >}} - {{< tab header="JavaScript" text=true >}} - {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} - {{< /tab >}} - {{< tab header="Kotlin" >}} - +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} +{{< /tab >}} +{{< tab header="JavaScript" text=true >}} +{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} +{{< /tab >}} +{{< tab header="Kotlin" >}} // Navigate to Url driver.get("https://www.selenium.dev/selenium/web/colorPage.html") // Retrieves the computed style property 'color' of linktext val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-color") - - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} ## 要素テキストを取得 指定された要素のレンダリングされたテキストを取得します。 - {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/linked_image.html") - - # Retrieves the text of the element -text = driver.find_element(By.ID, "justanotherlink").text - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L41" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -265,13 +234,13 @@ text = driver.find_element(By.ID, "justanotherlink").text {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L84-L86">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/linked_image.html") // retrieves the text of the element val text = driver.findElement(By.id("justanotherlink")).getText() - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} ## Fetching Attributes or Properties @@ -284,17 +253,10 @@ with the DOM attribute or property of the element. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}} {{< /tab >}} - {{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Identify the email text box -email_txt = driver.find_element(By.NAME, "email_input") - -# Fetch the value property associated with the textbox -value_info = email_txt.get_attribute("value") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L44-L46" >}} {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -303,11 +265,13 @@ value_info = email_txt.get_attribute("value") {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L55-L59">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/inputs.html") //fetch the value property associated with the textbox val attr = driver.findElement(By.name("email_input")).getAttribute("value") - {{< /tab >}} -{{< /tabpane >}} + +{{< /tab >}} +{{< /tabpane >}} \ No newline at end of file diff --git a/website_and_docs/content/documentation/webdriver/elements/information.pt-br.md b/website_and_docs/content/documentation/webdriver/elements/information.pt-br.md index 40dff38dfb1b..4b985b45398c 100644 --- a/website_and_docs/content/documentation/webdriver/elements/information.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/elements/information.pt-br.md @@ -30,14 +30,10 @@ nature and relationship in the tree to return a value. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}} {{< /tab >}} -{{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Get boolean value for is element display -is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L12-L15" >}} {{< /tab >}} -{{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -47,11 +43,13 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}} {{< /tab >}} {{< tab header="Kotlin" >}} + //navigates to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") //returns true if element is displayed else returns false val flag = driver.findElement(By.name("email_input")).isDisplayed() + {{< /tab >}} {{< /tabpane >}} @@ -66,14 +64,10 @@ Returns a boolean value, **True** if the connected element is {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is enabled else returns false -value = driver.find_element(By.NAME, 'button_input').is_enabled() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L19" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -82,13 +76,13 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled() {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns true if element is enabled else returns false - val attr = driver.findElement(By.name("button_input")).isEnabled() - {{< /tab >}} +//returns true if element is enabled else returns false +val attr = driver.findElement(By.name("button_input")).isEnabled() +{{< /tab >}} {{< /tabpane >}} @@ -107,14 +101,10 @@ Retorna um valor booleano, **true** se o elemento referenciado for {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is checked else returns false -value = driver.find_element(By.NAME, "checkbox_input").is_selected() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L23" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -123,13 +113,15 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected() {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + //navigates to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") //returns true if element is checked else returns false val attr = driver.findElement(By.name("checkbox_input")).isSelected() - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} ## Coletar TagName do elemento @@ -141,14 +133,10 @@ do elemento referenciado que tem o foco no contexto de navegação atual. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns TagName of the element -attr = driver.find_element(By.NAME, "email_input").tag_name - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L27" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -157,13 +145,13 @@ attr = driver.find_element(By.NAME, "email_input").tag_name {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns TagName of the element - val attr = driver.findElement(By.name("email_input")).getTagName() - {{< /tab >}} +//returns TagName of the element +val attr = driver.findElement(By.name("email_input")).getTagName() +{{< /tab >}} {{< /tabpane >}} ## Coletar retângulo do elemento @@ -182,14 +170,10 @@ O corpo de dados buscado contém os seguintes detalhes: {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns height, width, x and y coordinates referenced element -res = driver.find_element(By.NAME, "range_input").rect - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L31" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -198,7 +182,7 @@ res = driver.find_element(By.NAME, "range_input").rect {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L45">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} // Navigate to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") @@ -207,7 +191,7 @@ val res = driver.findElement(By.name("range_input")).rect // Rectangle class provides getX,getY, getWidth, getHeight methods println(res.getX()) - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} ## Coletar valor CSS do elemento @@ -219,25 +203,19 @@ de um elemento no contexto de navegação atual. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to Url -driver.get('https://www.selenium.dev/selenium/web/colorPage.html') - - # Retrieves the computed style property 'color' of linktext -cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color') - - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L35-L37" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}} +{{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} +{{< /tab >}} +{{< tab header="JavaScript" text=true >}} +{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} {{< /tab >}} - {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} - {{< /tab >}} - {{< tab header="JavaScript" text=true >}} - {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} - {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} // Navigate to Url driver.get("https://www.selenium.dev/selenium/web/colorPage.html") @@ -245,7 +223,7 @@ driver.get("https://www.selenium.dev/selenium/web/colorPage.html") // Retrieves the computed style property 'color' of linktext val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-color") - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} @@ -257,14 +235,10 @@ Recupera o texto renderizado do elemento especificado. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/linked_image.html") - - # Retrieves the text of the element -text = driver.find_element(By.ID, "justanotherlink").text - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L41" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -273,13 +247,15 @@ text = driver.find_element(By.ID, "justanotherlink").text {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L84-L86">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/linked_image.html") // retrieves the text of the element val text = driver.findElement(By.id("justanotherlink")).getText() - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} ## Fetching Attributes or Properties @@ -292,17 +268,10 @@ with the DOM attribute or property of the element. {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}} {{< /tab >}} - {{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Identify the email text box -email_txt = driver.find_element(By.NAME, "email_input") - -# Fetch the value property associated with the textbox -value_info = email_txt.get_attribute("value") - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L44-L46" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -311,11 +280,13 @@ value_info = email_txt.get_attribute("value") {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L55-L59">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/inputs.html") //fetch the value property associated with the textbox val attr = driver.findElement(By.name("email_input")).getAttribute("value") - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/information.zh-cn.md b/website_and_docs/content/documentation/webdriver/elements/information.zh-cn.md index 4653f0006307..d603062dba81 100644 --- a/website_and_docs/content/documentation/webdriver/elements/information.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/elements/information.zh-cn.md @@ -23,14 +23,10 @@ description: > {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}} {{< /tab >}} -{{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Get boolean value for is element display -is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L12-L15" >}} {{< /tab >}} -{{< tab header="CSharp" >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -40,15 +36,16 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}} {{< /tab >}} {{< tab header="Kotlin" >}} + //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +driver.get("https://www.selenium.dev/selenium/web/inputs.html") + +//returns true if element is displayed else returns false +val flag = driver.findElement(By.name("email_input")).isDisplayed() - //returns true if element is displayed else returns false - val flag = driver.findElement(By.name("email_input")).isDisplayed() {{< /tab >}} {{< /tabpane >}} - ## 是否启用 此方法用于检查所连接的元素在网页上是启用还是禁用状态。 @@ -58,14 +55,10 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is enabled else returns false -value = driver.find_element(By.NAME, 'button_input').is_enabled() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L19" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -74,13 +67,15 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled() {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} + +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns true if element is enabled else returns false - val attr = driver.findElement(By.name("button_input")).isEnabled() - {{< /tab >}} +//returns true if element is enabled else returns false +val attr = driver.findElement(By.name("button_input")).isEnabled() + +{{< /tab >}} {{< /tabpane >}} ## 是否被选定 @@ -93,14 +88,10 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns true if element is checked else returns false -value = driver.find_element(By.NAME, "checkbox_input").is_selected() - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} + {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L23" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -109,13 +100,15 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected() {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} + +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") + +//returns true if element is checked else returns false +val attr = driver.findElement(By.name("checkbox_input")).isSelected() - //returns true if element is checked else returns false - val attr = driver.findElement(By.name("checkbox_input")).isSelected() - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} ## 获取元素标签名 @@ -126,14 +119,10 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns TagName of the element -attr = driver.find_element(By.NAME, "email_input").tag_name - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L27" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -142,13 +131,15 @@ attr = driver.find_element(By.NAME, "email_input").tag_name {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}} {{< /tab >}} - {{< tab header="Kotlin" >}} - //navigates to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") +{{< tab header="Kotlin" >}} + +//navigates to url +driver.get("https://www.selenium.dev/selenium/web/inputs.html") - //returns TagName of the element - val attr = driver.findElement(By.name("email_input")).getTagName() - {{< /tab >}} +//returns TagName of the element +val attr = driver.findElement(By.name("email_input")).getTagName() + +{{< /tab >}} {{< /tabpane >}} ## 位置和大小 @@ -166,14 +157,10 @@ attr = driver.find_element(By.NAME, "email_input").tag_name {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Returns height, width, x and y coordinates referenced element -res = driver.find_element(By.NAME, "range_input").rect - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L31" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -182,7 +169,8 @@ res = driver.find_element(By.NAME, "range_input").rect {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L45">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to url driver.get("https://www.selenium.dev/selenium/web/inputs.html") @@ -191,7 +179,8 @@ val res = driver.findElement(By.name("range_input")).rect // Rectangle class provides getX,getY, getWidth, getHeight methods println(res.getX()) - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} ## 获取元素CSS值 @@ -202,25 +191,19 @@ println(res.getX()) {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to Url -driver.get('https://www.selenium.dev/selenium/web/colorPage.html') - - # Retrieves the computed style property 'color' of linktext -cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color') - - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L35-L37" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}} {{< /tab >}} - {{< tab header="Ruby" text=true >}} - {{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} - {{< /tab >}} - {{< tab header="JavaScript" text=true >}} - {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} - {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}} +{{< /tab >}} +{{< tab header="JavaScript" text=true >}} +{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}} +{{< /tab >}} +{{< tab header="Kotlin" >}} // Navigate to Url driver.get("https://www.selenium.dev/selenium/web/colorPage.html") @@ -228,10 +211,9 @@ driver.get("https://www.selenium.dev/selenium/web/colorPage.html") // Retrieves the computed style property 'color' of linktext val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-color") - {{< /tab >}} +{{< /tab >}} {{< /tabpane >}} - ## 文本内容 获取特定元素渲染后的文本内容。 @@ -241,14 +223,10 @@ val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-c {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}} {{< /tab >}} - {{< tab header="Python" >}} - # Navigate to url -driver.get("https://www.selenium.dev/selenium/web/linked_image.html") - - # Retrieves the text of the element -text = driver.find_element(By.ID, "justanotherlink").text - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L41" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -257,13 +235,15 @@ text = driver.find_element(By.ID, "justanotherlink").text {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L84-L86">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/linked_image.html") // retrieves the text of the element val text = driver.findElement(By.id("justanotherlink")).getText() - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} ## 获取特性或属性 @@ -275,17 +255,10 @@ val text = driver.findElement(By.id("justanotherlink")).getText() {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}} {{< /tab >}} - {{< tab header="Python" >}} -# Navigate to the url -driver.get("https://www.selenium.dev/selenium/web/inputs.html") - -# Identify the email text box -email_txt = driver.find_element(By.NAME, "email_input") - -# Fetch the value property associated with the textbox -value_info = email_txt.get_attribute("value") - {{< /tab >}} - {{< tab header="CSharp" >}} +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_information.py#L44-L46" >}} +{{< /tab >}} +{{< tab header="CSharp" text=true >}} {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}} {{< /tab >}} {{< tab header="Ruby" text=true >}} @@ -294,11 +267,13 @@ value_info = email_txt.get_attribute("value") {{< tab header="JavaScript" text=true >}} {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L55-L59">}} {{< /tab >}} - {{< tab header="Kotlin" >}} +{{< tab header="Kotlin" >}} + // Navigate to URL driver.get("https://www.selenium.dev/selenium/web/inputs.html") //fetch the value property associated with the textbox val attr = driver.findElement(By.name("email_input")).getAttribute("value") - {{< /tab >}} + +{{< /tab >}} {{< /tabpane >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/interactions.en.md b/website_and_docs/content/documentation/webdriver/elements/interactions.en.md index 086537038ee7..654f2a489429 100644 --- a/website_and_docs/content/documentation/webdriver/elements/interactions.en.md +++ b/website_and_docs/content/documentation/webdriver/elements/interactions.en.md @@ -48,13 +48,8 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}} {{< /tab >}} -{{< tab header="Python" >}} - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Click on the element - driver.find_element(By.NAME, "color_input").click() +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -94,18 +89,8 @@ possible keystrokes that WebDriver Supports. {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L27-L32" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - # Enter Text - driver.find_element(By.NAME, "email_input").send_keys("admin@localhost.dev" ) - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -146,16 +131,8 @@ with a`content-editable` attribute. If these conditions are not met, {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/interactions.ja.md b/website_and_docs/content/documentation/webdriver/elements/interactions.ja.md index e0e57066ac5b..0800ff320eec 100644 --- a/website_and_docs/content/documentation/webdriver/elements/interactions.ja.md +++ b/website_and_docs/content/documentation/webdriver/elements/interactions.ja.md @@ -44,13 +44,8 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Click on the element - driver.find_element(By.NAME, "color_input").click() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -91,18 +86,8 @@ possible keystrokes that WebDriver Supports. {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L27-L32" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - # Enter Text - driver.find_element(By.NAME, "email_input").send_keys("admin@localhost.dev" ) - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -142,16 +127,8 @@ with a`content-editable` attribute. If these conditions are not met, {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/interactions.pt-br.md b/website_and_docs/content/documentation/webdriver/elements/interactions.pt-br.md index 2dd9a8aceaed..abc2839a3368 100644 --- a/website_and_docs/content/documentation/webdriver/elements/interactions.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/elements/interactions.pt-br.md @@ -45,13 +45,8 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Click on the element - driver.find_element(By.NAME, "color_input").click() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -92,18 +87,8 @@ possible keystrokes that WebDriver Supports. {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L27-L32" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - # Enter Text - driver.find_element(By.NAME, "email_input").send_keys("admin@localhost.dev" ) - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -143,16 +128,8 @@ with a`content-editable` attribute. If these conditions are not met, {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/elements/interactions.zh-cn.md b/website_and_docs/content/documentation/webdriver/elements/interactions.zh-cn.md index 570635108a07..03f348ea38d9 100644 --- a/website_and_docs/content/documentation/webdriver/elements/interactions.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/elements/interactions.zh-cn.md @@ -47,13 +47,8 @@ Selenium将返回一个 [元素点击中断](https://w3c.github.io/webdriver/#df {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}} {{< /tab >}} - {{< tab header="Python" >}} - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Click on the element - driver.find_element(By.NAME, "color_input").click() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -94,18 +89,8 @@ Selenium将返回一个 [元素点击中断](https://w3c.github.io/webdriver/#df {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L27-L32" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - # Enter Text - driver.find_element(By.NAME, "email_input").send_keys("admin@localhost.dev" ) - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} @@ -147,16 +132,8 @@ Selenium将返回一个 [元素点击中断](https://w3c.github.io/webdriver/#df {{< tab header="Java" text=true >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}} {{< /tab >}} - {{< tab header="Python" >}} - - - # Navigate to url - driver.get("https://www.selenium.dev/selenium/web/inputs.html") - - # Clear field to empty it from any previous data - driver.find_element(By.NAME, "email_input").clear() - - + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}} {{< /tab >}} {{< tab header="CSharp" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/alerts.en.md b/website_and_docs/content/documentation/webdriver/interactions/alerts.en.md index 961f2143639a..8ddf4967592e 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/alerts.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/alerts.en.md @@ -25,9 +25,8 @@ WebDriver can get the text from the popup and accept or dismiss these alerts. {{< tabpane langEqualsHeader=true >}} -{{< badge-examples >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -77,9 +76,8 @@ a sample confirm. This example also shows a different approach to storing an alert: {{< tabpane langEqualsHeader=true >}} -{{< badge-examples >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -137,9 +135,8 @@ See a sample prompt. {{< tabpane langEqualsHeader=true >}} -{{< badge-examples >}} - {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}} {{< /tab >}} {{< tab header="Python" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/alerts.ja.md b/website_and_docs/content/documentation/webdriver/interactions/alerts.ja.md index 519f9142dc5d..eed2c39bda59 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/alerts.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/alerts.ja.md @@ -22,7 +22,7 @@ WebDriverはポップアップからテキストを取得し、これらのア {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -72,7 +72,7 @@ alert.accept() {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -129,7 +129,7 @@ alert.dismiss() {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}} {{< /tab >}} {{< tab header="Python" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/alerts.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/alerts.pt-br.md index 9b17d798786a..e741c7e2ab78 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/alerts.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/alerts.pt-br.md @@ -26,7 +26,7 @@ alertas. {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}} {{< /tab >}} {{< tab header="Python" text=true >}} {{< gh-codeblock path="examples/python/tests/interactions/test_alerts.py#L12-L18" >}} @@ -63,7 +63,7 @@ Este exemplo também mostra uma abordagem diferente para armazenar um alerta: {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -122,7 +122,7 @@ Veja um exemplo de prompt . {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}} {{< /tab >}} {{< tab header="Python" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/alerts.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/alerts.zh-cn.md index 2ebcf0ced87e..b7986383e8f3 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/alerts.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/alerts.zh-cn.md @@ -19,7 +19,7 @@ WebDriver可以从弹窗获取文本并接受或关闭这些警告. {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L56" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L51-L57" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -68,7 +68,7 @@ alert.accept() {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L71" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L66-L72" >}} {{< /tab >}} {{< tab header="Python" text=true >}} @@ -124,7 +124,7 @@ alert.dismiss() {{< tabpane langEqualsHeader=true >}} {{< tab header="Java" text=true >}} -{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L87" >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java#L80-L88" >}} {{< /tab >}} {{< tab header="Python" text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/cookies.en.md b/website_and_docs/content/documentation/webdriver/interactions/cookies.en.md index bb9bc511a65c..faf9b67ed173 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/cookies.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/cookies.en.md @@ -27,54 +27,14 @@ e.g. http://example.com/some404page) {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class addCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - - // Adds the cookie into current browser context - driver.manage().addCookie(new Cookie("key", "value")); - } finally { - driver.quit(); - } - } -} +{{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L30-L32" >}} {{< /tab >}} -{{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "key", "value": "value"}) +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L5-L9" >}} {{< /tab >}} -{{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace AddCookie { - class AddCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - - // Adds the cookie into current browser context - driver.Manage().Cookies.AddCookie(new Cookie("key", "value")); - } finally { - driver.Quit(); - } - } - } -} +{{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L32-L34" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -116,62 +76,14 @@ It returns the serialized cookie data matching with the cookie name among all as {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class getCookieNamed { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - Cookie cookie1 = driver.manage().getCookieNamed("foo"); - System.out.println(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L38-L42" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "foo", "value": "bar"}) - -# Get cookie details with named cookie 'foo' -print(driver.get_cookie("foo")) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L13-L20" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetCookieNamed { - class GetCookieNamed { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - var cookie = driver.Manage().Cookies.GetCookieNamed("foo"); - System.Console.WriteLine(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L40-L44" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -217,65 +129,14 @@ If browser is no longer available it returns error. {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; -import java.util.Set; - -public class getAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - // Add few cookies - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - Set cookies = driver.manage().getCookies(); - System.out.println(cookies); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L52-L66" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Get all available cookies -print(driver.get_cookies()) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L24-L32" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetAllCookies { - class GetAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - var cookies = driver.Manage().Cookies.AllCookies; - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L51-L64" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -323,72 +184,14 @@ It deletes the cookie data matching with the provided cookie name. {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - Cookie cookie1 = new Cookie("test2", "cookie2"); - driver.manage().addCookie(cookie1); - - // delete a cookie with name 'test1' - driver.manage().deleteCookieNamed("test1"); - - /* - Selenium Java bindings also provides a way to delete - cookie by passing cookie object of current browsing context - */ - driver.manage().deleteCookie(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L74-L77" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Delete a cookie with name 'test1' -driver.delete_cookie("test1") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L35-L43" text=true >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteCookie { - class DeleteCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - var cookie = new Cookie("test2", "cookie2"); - driver.Manage().Cookies.AddCookie(cookie); - - // delete a cookie with name 'test1' - driver.Manage().Cookies.DeleteCookieNamed("test1"); - - // Selenium .net bindings also provides a way to delete - // cookie by passing cookie object of current browsing context - driver.Manage().Cookies.DeleteCookie(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L70-L73" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -439,60 +242,14 @@ It deletes all the cookies of the current browsing context. {{< tabpane langEqualsHeader=true >}} {{< badge-examples >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.manage().deleteAllCookies(); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L100-L105" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Deletes all cookies -driver.delete_all_cookies() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L47-L55" text=true >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteAllCookies { - class DeleteAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.Manage().Cookies.DeleteAllCookies(); - } finally { - driver.Quit(); - } - } - } -} +{{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L92-L97" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -576,19 +333,8 @@ public class cookieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") -# Adds the cookie into current browser context with sameSite 'Strict' (or) 'Lax' -driver.add_cookie({"name": "foo", "value": "value", 'sameSite': 'Strict'}) -driver.add_cookie({"name": "foo1", "value": "value", 'sameSite': 'Lax'}) -cookie1 = driver.get_cookie('foo') -cookie2 = driver.get_cookie('foo1') -print(cookie1) -print(cookie2) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L59-L71" text=true >}} {{< /tab >}} {{< tab header="CSharp" >}} using OpenQA.Selenium; diff --git a/website_and_docs/content/documentation/webdriver/interactions/cookies.ja.md b/website_and_docs/content/documentation/webdriver/interactions/cookies.ja.md index 9087c05e10e4..bbaf18f3eb89 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/cookies.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/cookies.ja.md @@ -24,54 +24,14 @@ Cookieの追加では、一連の定義済みのシリアル化可能なJSONオ サイトとの対話を開始する前にCookieを事前設定しようとしていて、ホームページが大きい場合/代替の読み込みに時間がかかる場合は、サイトで小さいページを見つけることです。(通常、たとえば http://example.com/some404page のような、404ページは小さいです。) {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class addCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - - // Adds the cookie into current browser context - driver.manage().addCookie(new Cookie("key", "value")); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L30-L32" >}} {{< /tab >}} -{{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "key", "value": "value"}) +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L5-L9" >}} {{< /tab >}} -{{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace AddCookie { - class AddCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - - // Adds the cookie into current browser context - driver.Manage().Cookies.AddCookie(new Cookie("key", "value")); - } finally { - driver.Quit(); - } - } - } -} +{{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L32-L34" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -112,62 +72,14 @@ fun main() { 関連付けられているすべてのCookieの中で、Cookie名と一致するシリアル化されたCookieデータを返します。 {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class getCookieNamed { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - Cookie cookie1 = driver.manage().getCookieNamed("foo"); - System.out.println(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L38-L42" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "foo", "value": "bar"}) - -# Get cookie details with named cookie 'foo' -print(driver.get_cookie("foo")) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L13-L20" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetCookieNamed { - class GetCookieNamed { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - var cookie = driver.Manage().Cookies.GetCookieNamed("foo"); - System.Console.WriteLine(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L40-L44" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -212,65 +124,14 @@ fun main() { ブラウザが使用できなくなった場合、エラーが返されます。 {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; -import java.util.Set; - -public class getAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - // Add few cookies - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - Set cookies = driver.manage().getCookies(); - System.out.println(cookies); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L52-L66" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Get all available cookies -print(driver.get_cookies()) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L24-L32" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetAllCookies { - class GetAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - var cookies = driver.Manage().Cookies.AllCookies; - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L51-L64" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -317,72 +178,14 @@ fun main() { 指定されたCookie名と一致するCookieデータを削除します。 {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - Cookie cookie1 = new Cookie("test2", "cookie2"); - driver.manage().addCookie(cookie1); - - // delete a cookie with name 'test1' - driver.manage().deleteCookieNamed("test1"); - - /* - Selenium Java bindings also provides a way to delete - cookie by passing cookie object of current browsing context - */ - driver.manage().deleteCookie(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L74-L77" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Delete a cookie with name 'test1' -driver.delete_cookie("test1") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L35-L43" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteCookie { - class DeleteCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - var cookie = new Cookie("test2", "cookie2"); - driver.Manage().Cookies.AddCookie(cookie); - - // delete a cookie with name 'test1' - driver.Manage().Cookies.DeleteCookieNamed("test1"); - - // Selenium .net bindings also provides a way to delete - // cookie by passing cookie object of current browsing context - driver.Manage().Cookies.DeleteCookie(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L70-L73" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -432,60 +235,14 @@ fun main() { 現在のブラウジングコンテキストの全てのCookieを削除します。 {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.manage().deleteAllCookies(); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L100-L105" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Deletes all cookies -driver.delete_all_cookies() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L47-L55" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteAllCookies { - class DeleteAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.Manage().Cookies.DeleteAllCookies(); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L92-L97" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -566,19 +323,8 @@ public class cookieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") -# Adds the cookie into current browser context with sameSite 'Strict' (or) 'Lax' -driver.add_cookie({"name": "foo", "value": "value", 'sameSite': 'Strict'}) -driver.add_cookie({"name": "foo1", "value": "value", 'sameSite': 'Lax'}) -cookie1 = driver.get_cookie('foo') -cookie2 = driver.get_cookie('foo1') -print(cookie1) -print(cookie2) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L59-L71" >}} {{< /tab >}} {{< tab header="CSharp" >}} using OpenQA.Selenium; diff --git a/website_and_docs/content/documentation/webdriver/interactions/cookies.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/cookies.pt-br.md index 81c16683e632..a43b9f30ff6f 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/cookies.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/cookies.pt-br.md @@ -26,54 +26,14 @@ uma alternativa é encontrar uma página menor no site (normalmente a página 40 por exemplo http://example.com/some404page) {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class addCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - - // Adds the cookie into current browser context - driver.manage().addCookie(new Cookie("key", "value")); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L30-L32" >}} {{< /tab >}} -{{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "key", "value": "value"}) +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L5-L9" >}} {{< /tab >}} -{{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace AddCookie { - class AddCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - - // Adds the cookie into current browser context - driver.Manage().Cookies.AddCookie(new Cookie("key", "value")); - } finally { - driver.Quit(); - } - } - } -} +{{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L32-L34" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -114,62 +74,14 @@ fun main() { Retorna os dados do cookie serializado correspondentes ao nome do cookie entre todos os cookies associados. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class getCookieNamed { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - Cookie cookie1 = driver.manage().getCookieNamed("foo"); - System.out.println(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L38-L42" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "foo", "value": "bar"}) - -# Get cookie details with named cookie 'foo' -print(driver.get_cookie("foo")) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L13-L20" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetCookieNamed { - class GetCookieNamed { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - var cookie = driver.Manage().Cookies.GetCookieNamed("foo"); - System.Console.WriteLine(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L40-L44" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -214,65 +126,14 @@ Retorna 'dados de cookie serializados com sucesso' para o contexto de navegaçã Se o navegador não estiver mais disponível, ele retornará um erro. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; -import java.util.Set; - -public class getAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - // Add few cookies - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - Set cookies = driver.manage().getCookies(); - System.out.println(cookies); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L52-L66" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Get all available cookies -print(driver.get_cookies()) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L24-L32" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetAllCookies { - class GetAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - var cookies = driver.Manage().Cookies.AllCookies; - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L51-L64" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -319,72 +180,14 @@ fun main() { Exclui os dados do cookie que correspondem ao nome do cookie fornecido. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - Cookie cookie1 = new Cookie("test2", "cookie2"); - driver.manage().addCookie(cookie1); - - // delete a cookie with name 'test1' - driver.manage().deleteCookieNamed("test1"); - - /* - Selenium Java bindings also provides a way to delete - cookie by passing cookie object of current browsing context - */ - driver.manage().deleteCookie(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L74-L77" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Delete a cookie with name 'test1' -driver.delete_cookie("test1") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L35-L43" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteCookie { - class DeleteCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - var cookie = new Cookie("test2", "cookie2"); - driver.Manage().Cookies.AddCookie(cookie); - - // delete a cookie with name 'test1' - driver.Manage().Cookies.DeleteCookieNamed("test1"); - - // Selenium .net bindings also provides a way to delete - // cookie by passing cookie object of current browsing context - driver.Manage().Cookies.DeleteCookie(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L70-L73" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -434,60 +237,14 @@ fun main() { Exclui todos os cookies do contexto de navegação atual. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.manage().deleteAllCookies(); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L100-L105" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Deletes all cookies -driver.delete_all_cookies() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L47-L55" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteAllCookies { - class DeleteAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.Manage().Cookies.DeleteAllCookies(); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L92-L97" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -570,19 +327,8 @@ public class cookieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") -# Adds the cookie into current browser context with sameSite 'Strict' (or) 'Lax' -driver.add_cookie({"name": "foo", "value": "value", 'sameSite': 'Strict'}) -driver.add_cookie({"name": "foo1", "value": "value", 'sameSite': 'Lax'}) -cookie1 = driver.get_cookie('foo') -cookie2 = driver.get_cookie('foo1') -print(cookie1) -print(cookie2) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L59-L71" >}} {{< /tab >}} {{< tab header="CSharp" >}} using OpenQA.Selenium; diff --git a/website_and_docs/content/documentation/webdriver/interactions/cookies.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/cookies.zh-cn.md index c1c238959167..ee59ba099913 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/cookies.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/cookies.zh-cn.md @@ -22,54 +22,14 @@ WebDriver API提供了一种使用内置的方法与Cookie进行交互: 例如 http://example.com/some404page) {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class addCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - - // Adds the cookie into current browser context - driver.manage().addCookie(new Cookie("key", "value")); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L30-L32" >}} {{< /tab >}} -{{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "key", "value": "value"}) +{{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L5-9" >}} {{< /tab >}} -{{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace AddCookie { - class AddCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - - // Adds the cookie into current browser context - driver.Manage().Cookies.AddCookie(new Cookie("key", "value")); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L32-L34" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -110,62 +70,14 @@ fun main() { 此方法返回与cookie名称匹配的序列化cookie数据中所有关联的cookie. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class getCookieNamed { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - Cookie cookie1 = driver.manage().getCookieNamed("foo"); - System.out.println(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L38-L42" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -# Adds the cookie into current browser context -driver.add_cookie({"name": "foo", "value": "bar"}) - -# Get cookie details with named cookie 'foo' -print(driver.get_cookie("foo")) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L13-L20" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetCookieNamed { - class GetCookieNamed { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("foo", "bar")); - - // Get cookie details with named cookie 'foo' - var cookie = driver.Manage().Cookies.GetCookieNamed("foo"); - System.Console.WriteLine(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L40-L44" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -209,65 +121,14 @@ fun main() { 此方法会针对当前访问上下文返回“成功的序列化cookie数据”. 如果浏览器不再可用, 则返回错误. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; -import java.util.Set; - -public class getAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - // Add few cookies - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - Set cookies = driver.manage().getCookies(); - System.out.println(cookies); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L52-L66" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") - -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Get all available cookies -print(driver.get_cookies()) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L24-L32" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace GetAllCookies { - class GetAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // Get All available cookies - var cookies = driver.Manage().Cookies.AllCookies; - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L51-L64" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -314,72 +175,14 @@ fun main() { 此方法删除与提供的cookie名称匹配的cookie数据. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteCookie { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - Cookie cookie1 = new Cookie("test2", "cookie2"); - driver.manage().addCookie(cookie1); - - // delete a cookie with name 'test1' - driver.manage().deleteCookieNamed("test1"); - - /* - Selenium Java bindings also provides a way to delete - cookie by passing cookie object of current browsing context - */ - driver.manage().deleteCookie(cookie1); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L74-L77" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Delete a cookie with name 'test1' -driver.delete_cookie("test1") + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L35-L43" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteCookie { - class DeleteCookie { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - var cookie = new Cookie("test2", "cookie2"); - driver.Manage().Cookies.AddCookie(cookie); - - // delete a cookie with name 'test1' - driver.Manage().Cookies.DeleteCookieNamed("test1"); - - // Selenium .net bindings also provides a way to delete - // cookie by passing cookie object of current browsing context - driver.Manage().Cookies.DeleteCookie(cookie); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L70-L73" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -429,60 +232,14 @@ fun main() { 此方法删除当前访问上下文的所有cookie. {{< tabpane langEqualsHeader=true >}} - {{< tab header="Java" >}} -import org.openqa.selenium.*; -import org.openqa.selenium.chrome.ChromeDriver; - -public class deleteAllCookies { - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - try { - driver.get("http://www.example.com"); - driver.manage().addCookie(new Cookie("test1", "cookie1")); - driver.manage().addCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.manage().deleteAllCookies(); - } finally { - driver.quit(); - } - } -} + {{< tab header="Java" text=true >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java#L100-L105" >}} {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver -driver = webdriver.Chrome() - -# Navigate to url -driver.get("http://www.example.com") -driver.add_cookie({"name": "test1", "value": "cookie1"}) -driver.add_cookie({"name": "test2", "value": "cookie2"}) - -# Deletes all cookies -driver.delete_all_cookies() + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L47-L55" >}} {{< /tab >}} - {{< tab header="CSharp" >}} -using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; - -namespace DeleteAllCookies { - class DeleteAllCookies { - public static void Main(string[] args) { - IWebDriver driver = new ChromeDriver(); - try { - // Navigate to Url - driver.Navigate().GoToUrl("https://example.com"); - driver.Manage().Cookies.AddCookie(new Cookie("test1", "cookie1")); - driver.Manage().Cookies.AddCookie(new Cookie("test2", "cookie2")); - - // deletes all cookies - driver.Manage().Cookies.DeleteAllCookies(); - } finally { - driver.Quit(); - } - } - } -} + {{< tab header="CSharp" text=true >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/CookiesTest.cs#L92-L97" >}} {{< /tab >}} {{< tab header="Ruby" >}} require 'selenium-webdriver' @@ -564,19 +321,8 @@ public class cookieTest { } } {{< /tab >}} - {{< tab header="Python" >}} -from selenium import webdriver - -driver = webdriver.Chrome() - -driver.get("http://www.example.com") -# Adds the cookie into current browser context with sameSite 'Strict' (or) 'Lax' -driver.add_cookie({"name": "foo", "value": "value", 'sameSite': 'Strict'}) -driver.add_cookie({"name": "foo1", "value": "value", 'sameSite': 'Lax'}) -cookie1 = driver.get_cookie('foo') -cookie2 = driver.get_cookie('foo1') -print(cookie1) -print(cookie2) + {{< tab header="Python" text=true >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_cookies.py#L59-L71" >}} {{< /tab >}} {{< tab header="CSharp" >}} using OpenQA.Selenium; diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md index c9f160ceed03..5a900b1f2190 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md @@ -160,7 +160,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tabpane >}} ### ShrinkToFit -Using `getBackground()` and `setBackground()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. +Using `getShrinkToFit()` and `setShrinkToFit()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md index dacc73ad9b68..40b19d6029fe 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md @@ -160,7 +160,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tabpane >}} ### ShrinkToFit -Using `getBackground()` and `setBackground()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. +Using `getShrinkToFit()` and `setShrinkToFit()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md index 59c05c42ff85..5600370d1755 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md @@ -160,7 +160,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tabpane >}} ### ShrinkToFit -Using `getBackground()` and `setBackground()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. +Using `getShrinkToFit()` and `setShrinkToFit()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -205,7 +205,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md index 0268055e33e7..f25d7cc9427a 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md @@ -1,22 +1,20 @@ --- -title: "Print Page" -linkTitle: "Print Page" +title: "打印页面" +linkTitle: "打印页面" weight: 7 aliases: [ "/documentation/zh-cn/support_packages/print_page/", ] --- -Printing a webpage is a common task, whether for sharing information or maintaining archives. -Selenium simplifies this process through its PrintOptions, PrintsPage, and browsingContext -classes, which provide a flexible and intuitive interface for automating the printing of web pages. -These classes enable you to configure printing preferences, such as page layout, margins, and scaling, -ensuring that the output meets your specific requirements. +无论是共享信息还是维护档案,打印网页都是一项常见任务。 +Selenium 通过其 PrintOptions、PrintsPage 和 browsingContext 类简化了这一过程,这些类为网页自动打印提供了灵活直观的接口。 +这些类使得用户可以配置打印首选项,如页面布局、页边距和缩放比例,以确保输出满足特定要求。 -## Configuring +## 配置 -### Orientation -Using the `getOrientation()` and `setOrientation()` methods, you can get/set the page orientation --- either `PORTRAIT` or `LANDSCAPE`. +### 方向 +通过 `getOrientation()` 和 `setOrientation()` 方法,可以获取/设置页面方向(`PORTRAIT` 或 `LANDSCAPE`)。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -39,8 +37,8 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< /tab >}} {{< /tabpane >}} -### Range -Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the range of pages to print --- e.g. "2-4". +### 范围 +通过 `getPageRanges()` 和 `setPageRanges()` 方法,可以获取设置要打印页面的范围(如 "2-4")。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -63,8 +61,8 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< /tab >}} {{< /tabpane >}} -### Size -Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the paper size to print --- e.g. "A0", "A6", "Legal", "Tabloid", etc. +### 尺寸 +通过 `getPaperSize()` 和 `setPaperSize()` 方法,可以获取/设置要打印页面的纸张尺寸(如"A0"、"A6"、"Legal"、"Tabloid" 等)。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -87,8 +85,8 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< /tab >}} {{< /tabpane >}} -### Margins -Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margin sizes of the page you wish to print --- i.e. top, bottom, left, and right margins. +### 边距 +通过 `getPageMargin()` 和 `setPageMargin()` 方法,可以获取/设置要打印页面的边距大小(也就是上、下、左右边距)。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -111,8 +109,8 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< /tab >}} {{< /tabpane >}} -### Scale -Using `getScale()` and `setScale()` methods, you can get/set the scale of the page you wish to print --- e.g. 1.0 is 100% or default, 0.25 is 25%, etc. +### 缩放 +通过 `getScale()` 和 `setScale()` 方法,可以获取/设置要打印页面的缩放尺寸(如 1.0 为 100% 或默认缩放,0.25 为 25% 等)。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -135,8 +133,8 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< /tab >}} {{< /tabpane >}} -### Background -Using `getBackground()` and `setBackground()` methods, you can get/set whether background colors and images appear --- boolean `true` or `false`. +### 背景 +通过 `getBackground()` 和 `setBackground()` 方法,可以获取/设置背景色和图片出现,其为布尔值 `true` 或 `false`。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -159,8 +157,8 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tab >}} {{< /tabpane >}} -### ShrinkToFit -Using `getBackground()` and `setBackground()` methods, you can get/set whether the page will shrink-to-fit content on the page --- boolean `true` or `false`. +### 缩放至合适大小 +通过 `getShrinkToFit()` 和 `setShrinkToFit()` 方法,可以获取/设置页面是否会根据页面内容缩小,其为布尔值 `true` 或 `false`。 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -183,19 +181,17 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< /tab >}} {{< /tabpane >}} -## Printing +## 打印 -Once you've configured your PrintOptions, you're ready to print the page. To do this, -you can invoke the print function, which generates a PDF representation of the web page. -The resulting PDF can be saved to your local storage for further use or distribution. -Using `PrintsPage()`, the print command will return the PDF data in base64-encoded format, which can be decoded -and written to a file in your desired location, and using `BrowsingContext()` will return a String. +配置好打印选项后,就可以打印页面了。为此,您可以调用打印功能,生成网页的 PDF 表示形式。 +生成的 PDF 文件可以保存到本地存储器中,以便进一步使用或分发。 +使用 `PrintsPage()` 时,打印命令将以 base64 编码格式返回 PDF +数据,该格式可以解码并写入所需位置的文件,而使用 `BrowsingContext()` 时将返回字符串。 -There may currently be multiple implementations depending on your language of choice. For example, with Java you -have the ability to print using either `BrowingContext()` or `PrintsPage()`. Both take `PrintOptions()` objects as a -parameter. +目前可能有多种实现方式,这取决于您所选择的语言。例如,Java 可以使用 `BrowingContext()` +或 `PrintsPage()` 进行打印。两者都将 `PrintOptions()` 对象作为一个参数。 -Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable BiDi see [Enabling Bidi]({{< ref "bidi/" >}}) +注意:`BrowsingContext()` 是 Selenium BiDi 实现的一部分。为启用 BiDi,请参见[启用 Bidi]({{< ref "bidi/" >}}) {{< tabpane text=true >}} {{% tab header="Java" %}} @@ -205,7 +201,7 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/PrintsPageTest.java#L35-L42" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs#L81-L88" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md index 229bcfcb71a3..aa46ea9c05b3 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md @@ -107,7 +107,7 @@ Creates a resident (stateful) credential with the given required credential [par {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}} @@ -132,7 +132,7 @@ Creates a resident (stateless) credential with the given required credential [pa {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} @@ -157,7 +157,7 @@ Registers the credential with the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} @@ -182,7 +182,7 @@ Returns the list of credentials owned by the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} @@ -207,7 +207,7 @@ Removes a credential from the authenticator based on the passed credential id. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -233,7 +233,7 @@ Removes all the credentials from the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} @@ -258,7 +258,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md index b5b7f772a615..f290d7cc9ced 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md @@ -113,7 +113,7 @@ Creates a resident (stateful) credential with the given required credential [par {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}} @@ -137,7 +137,7 @@ Creates a resident (stateless) credential with the given required credential [pa {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} @@ -161,7 +161,7 @@ Registers the credential with the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} @@ -185,7 +185,7 @@ Returns the list of credentials owned by the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} @@ -210,7 +210,7 @@ Removes a credential from the authenticator based on the passed credential id. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< /tab >}} @@ -234,7 +234,7 @@ Removes all the credentials from the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} @@ -258,7 +258,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md index d6288dde3cd3..a7e6ce41e63a 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md @@ -104,7 +104,7 @@ Cria uma resident (stateful) credential com os requeridos [parâmetros](https:// {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}} @@ -128,7 +128,7 @@ Cria uma resident (stateless) credential com os requeridos [parâmetros](https:/ {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} @@ -152,7 +152,7 @@ Registra a credencial com o autenticador. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} @@ -176,7 +176,7 @@ Retorna a lista de credenciais que o autenticador possui. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} @@ -201,7 +201,7 @@ Remove a credencial do autenticador baseado na id da credencial passado. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< /tab >}} @@ -225,7 +225,7 @@ Remove todas as credenciais do autenticador. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} @@ -249,7 +249,7 @@ Diz se o autenticador simulará sucesso ou falha na verificação de usuário. {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md index 9e9cfb9fec17..0e5b7ba7c263 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md @@ -104,7 +104,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}} @@ -128,7 +128,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} @@ -152,7 +152,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} @@ -176,7 +176,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} @@ -201,7 +201,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< /tab >}} @@ -225,7 +225,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} @@ -249,7 +249,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/_index.en.md b/website_and_docs/content/documentation/webdriver/troubleshooting/_index.en.md index 7963e483b58e..428fc3eaba6d 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/_index.en.md @@ -3,7 +3,7 @@ title: "Troubleshooting Assistance" linkTitle: "Troubleshooting" weight: 20 description: > - How to get manage WebDriver problems. + How to solve WebDriver problems. --- It is not always obvious the root cause of errors in Selenium. diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/troubleshooting/_index.pt-br.md index 7963e483b58e..428fc3eaba6d 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/_index.pt-br.md @@ -3,7 +3,7 @@ title: "Troubleshooting Assistance" linkTitle: "Troubleshooting" weight: 20 description: > - How to get manage WebDriver problems. + How to solve WebDriver problems. --- It is not always obvious the root cause of errors in Selenium. diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md index acf3f2b0e4cd..409475e12c8a 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md @@ -3,7 +3,7 @@ title: "Understanding Common Errors" linkTitle: "Errors" weight: 2 description: > - How to get deal with various problems in your Selenium code. + How to solve various problems in your Selenium code. aliases: [ "/exceptions/", "/exceptions/invalid_selector_exception.html", diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md index 450a8b56c157..2241ec21470f 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md @@ -3,7 +3,7 @@ title: "Understanding Common Errors" linkTitle: "Errors" weight: 2 description: > - How to get deal with various problems in your Selenium code. + How to solve various problems in your Selenium code. --- ## InvalidSelectorException diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md index a01cdd0ae7b2..70f7d40a4811 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md @@ -3,7 +3,7 @@ title: "Understanding Common Errors" linkTitle: "Errors" weight: 2 description: > - How to get deal with various problems in your Selenium code. + How to solve various problems in your Selenium code. --- ## InvalidSelectorException diff --git a/website_and_docs/content/project/_index.html b/website_and_docs/content/project/_index.html index 77a8e37e4ffc..71da3e91f4dc 100644 --- a/website_and_docs/content/project/_index.html +++ b/website_and_docs/content/project/_index.html @@ -62,6 +62,9 @@

Structure

Selenium IDE Committers

+

+ Selenium Html Unit Committers +

Selenium Committers

diff --git a/website_and_docs/content/project/structure/_index.html b/website_and_docs/content/project/structure/_index.html index 3d6074ad033d..283ca9ec403a 100644 --- a/website_and_docs/content/project/structure/_index.html +++ b/website_and_docs/content/project/structure/_index.html @@ -28,7 +28,7 @@

Project Leadership Committee

{{< gh-user "https://api.github.com/users/mmerrell" >}} {{< gh-user "https://api.github.com/users/maaretp" >}} - {{< gh-user "https://api.github.com/users/diemol" >}} + {{< gh-user "https://api.github.com/users/diemol" >}}
@@ -41,6 +41,7 @@

Technical Leadership Committee

{{< gh-user "https://api.github.com/users/p0deje" >}} {{< gh-user "https://api.github.com/users/pujagani" >}} {{< gh-user "https://api.github.com/users/Harsha509" >}} + {{< gh-user "https://api.github.com/users/bonigarcia" >}}
@@ -55,6 +56,7 @@

Selenium IDE Committers

Selenium Committers

{{< gh-user "https://api.github.com/users/adamgoucher" >}} + {{< gh-user "https://api.github.com/users/aguspe" >}} {{< gh-user "https://api.github.com/users/andreastt" >}} {{< gh-user "https://api.github.com/users/AutomatedTester" >}} {{< gh-user "https://api.github.com/users/barancev" >}} @@ -86,15 +88,24 @@

Selenium Committers

{{< gh-user "https://api.github.com/users/mtscout6" >}} {{< gh-user "https://api.github.com/users/nirvdrum" >}} {{< gh-user "https://api.github.com/users/nvborisenko" >}} + {{< gh-user "https://api.github.com/users/paul-hammant" >}} {{< gh-user "https://api.github.com/users/p0deje" >}} {{< gh-user "https://api.github.com/users/pujagani" >}} {{< gh-user "https://api.github.com/users/santiycr" >}} {{< gh-user "https://api.github.com/users/sevaseva" >}} {{< gh-user "https://api.github.com/users/shs96c" >}} {{< gh-user "https://api.github.com/users/symonk" >}} + {{< gh-user "https://api.github.com/users/TamsilAmani" >}} {{< gh-user "https://api.github.com/users/titusfortner" >}} {{< gh-user "https://api.github.com/users/tourdedave" >}} {{< gh-user "https://api.github.com/users/twalpole" >}} + {{< gh-user "https://api.github.com/users/VietND96" >}} +
+
+
+

Selenium HtmlUnit Driver Committers

+
+ {{< gh-user "https://api.github.com/users/rbri" >}}
diff --git a/website_and_docs/content/sponsors/_index.html b/website_and_docs/content/sponsors/_index.html index 2fcc33ca15ce..a19ec3257e97 100644 --- a/website_and_docs/content/sponsors/_index.html +++ b/website_and_docs/content/sponsors/_index.html @@ -15,7 +15,7 @@

Sponsors

The following companies have sponsored the Selenium project. We thank - each and every one of them for their generous support. + each one of them for their generous support.

-{{< /blocks/section >}} \ No newline at end of file +{{< /blocks/section >}} diff --git a/website_and_docs/hugo.toml b/website_and_docs/hugo.toml index f4f7f3f4e23e..09d8ba68349d 100644 --- a/website_and_docs/hugo.toml +++ b/website_and_docs/hugo.toml @@ -234,7 +234,7 @@ enable = false desc = "Development takes place here!" [[params.links.developer]] name = "Slack" - url = "https://join.slack.com/t/seleniumhq/shared_invite/zt-2o0ilal4i-WzCcTdrlpmmsuE2TDILmgg" + url = "https://join.slack.com/t/seleniumhq/shared_invite/zt-2stlcmc6b-Hww~3r3yAzquhSq4riOFxA" icon = "fab fa-slack" desc = "Chat with other project developers and users in Slack" [[params.links.developer]] diff --git a/website_and_docs/layouts/downloads/list.html b/website_and_docs/layouts/downloads/list.html index 43548046667a..92867a864025 100644 --- a/website_and_docs/layouts/downloads/list.html +++ b/website_and_docs/layouts/downloads/list.html @@ -25,12 +25,20 @@

Latest stable version - 4.26.0 + 4.27.0

To use the Selenium Server in a Grid configuration see the documentation.

+

+ To run the Grid with popular browsers using Docker see the + repository. +

+

+ To deploy the Grid to Kubernetes cluster see the Helm chart + configuration. +

@@ -107,7 +115,7 @@

C# NuGet

- Nuget latest release is 4.26.0 Released on October 30, 2024. + Nuget latest release is 4.27.0 Released on November 25, 2024.

  • diff --git a/website_and_docs/layouts/partials/announcement-banner.html b/website_and_docs/layouts/partials/announcement-banner.html index a4457a332eb9..2d2edb0278e4 100644 --- a/website_and_docs/layouts/partials/announcement-banner.html +++ b/website_and_docs/layouts/partials/announcement-banner.html @@ -6,8 +6,8 @@
    diff --git a/website_and_docs/layouts/partials/bronze-level-sponsors.html b/website_and_docs/layouts/partials/bronze-level-sponsors.html index b1c2f793cbe3..3b0b924c5811 100644 --- a/website_and_docs/layouts/partials/bronze-level-sponsors.html +++ b/website_and_docs/layouts/partials/bronze-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.bronze.enable }}
    -

    Bronze Level Sponsors

    +

    Bronze Level Sponsors

    {{ range .Data.sponsors.bronze.item }} {{ end }} diff --git a/website_and_docs/layouts/partials/development-level-sponsors.html b/website_and_docs/layouts/partials/development-level-sponsors.html index 60d51d684696..cb411082497f 100644 --- a/website_and_docs/layouts/partials/development-level-sponsors.html +++ b/website_and_docs/layouts/partials/development-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.selenium.enable }}
    -

    Development Partners

    +

    Development Partners

    {{ range .Data.sponsors.development.item }} {{ end }} diff --git a/website_and_docs/layouts/partials/gold-level-sponsors.html b/website_and_docs/layouts/partials/gold-level-sponsors.html index b49feef8eee4..327308ed4d26 100644 --- a/website_and_docs/layouts/partials/gold-level-sponsors.html +++ b/website_and_docs/layouts/partials/gold-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.gold.enable }}
    -

    Gold Level Sponsors

    +

    Gold Level Sponsors

    {{ range .Data.sponsors.gold.item }} {{ end }} diff --git a/website_and_docs/layouts/partials/open-collective-level-sponsors.html b/website_and_docs/layouts/partials/open-collective-level-sponsors.html new file mode 100644 index 000000000000..ae0b7078916f --- /dev/null +++ b/website_and_docs/layouts/partials/open-collective-level-sponsors.html @@ -0,0 +1,7 @@ +
    +

    OpenCollective Sponsors

    +
    + +
    + +
    diff --git a/website_and_docs/layouts/partials/platinum-level-sponsors.html b/website_and_docs/layouts/partials/platinum-level-sponsors.html index 1d1d2f6259ce..5ae5cf1f3c67 100644 --- a/website_and_docs/layouts/partials/platinum-level-sponsors.html +++ b/website_and_docs/layouts/partials/platinum-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.platinum.enable }}
    -

    Platinum Level Sponsors

    +

    Platinum Level Sponsors

    {{ range .Data.sponsors.platinum.item }} {{ end }} diff --git a/website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html b/website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html index 142c0833f47e..dc59122b54c4 100644 --- a/website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html +++ b/website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html @@ -27,7 +27,7 @@

    Selenium Clients and WebDriver Language Bin

    Stable: - 4.26.0 (October 30, 2024) + 4.27.0 (November 25, 2024)

    @@ -54,8 +54,8 @@

    Selenium Clients and WebDriver Language Bin

    Stable: - - 4.26.0 (October 30, 2024) + + 4.27.0 (November 25, 2024)

    @@ -82,8 +82,8 @@

    Selenium Clients and WebDriver Language Bin

    Stable: - - 4.26.0 (October 30, 2024) + + 4.27.0 (November 25, 2024)

    @@ -111,7 +111,7 @@

    Selenium Clients and WebDriver Language Bin

    Stable: - 4.26.1 (October 31, 2024) + 4.27.1 (November 26, 2024)

    @@ -139,7 +139,7 @@

    Selenium Clients and WebDriver Language Bin

    Stable: - 4.26.0 (October 30, 2024) + 4.27.0 (November 25, 2024)

    diff --git a/website_and_docs/layouts/partials/selenium-level-sponsors.html b/website_and_docs/layouts/partials/selenium-level-sponsors.html index 418a13aa3669..25b71c321787 100644 --- a/website_and_docs/layouts/partials/selenium-level-sponsors.html +++ b/website_and_docs/layouts/partials/selenium-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.selenium.enable }}

    -

    Selenium Level Sponsors

    +

    Selenium Level Sponsors

    {{ range .Data.sponsors.selenium.item }} {{ end }} diff --git a/website_and_docs/layouts/partials/silver-level-sponsors.html b/website_and_docs/layouts/partials/silver-level-sponsors.html index ad24047cee11..011397353227 100644 --- a/website_and_docs/layouts/partials/silver-level-sponsors.html +++ b/website_and_docs/layouts/partials/silver-level-sponsors.html @@ -1,12 +1,16 @@ {{ if .Data.sponsors.silver.enable }}
    -

    Silver Level Sponsors

    +

    Silver Level Sponsors

    {{ range .Data.sponsors.silver.item }} {{ end }} diff --git a/website_and_docs/layouts/sponsors/list.html b/website_and_docs/layouts/sponsors/list.html index 3aa700711bc5..022c25074770 100644 --- a/website_and_docs/layouts/sponsors/list.html +++ b/website_and_docs/layouts/sponsors/list.html @@ -11,6 +11,7 @@ {{ partial "gold-level-sponsors.html" (dict "Data" $.Site.Data) }} {{ partial "silver-level-sponsors.html" (dict "Data" $.Site.Data) }} {{ partial "bronze-level-sponsors.html" (dict "Data" $.Site.Data) }} +{{ partial "open-collective-level-sponsors.html" }}
    @@ -24,4 +25,5 @@

    Sponsoring

    + {{ end }} diff --git a/website_and_docs/package-lock.json b/website_and_docs/package-lock.json index 75108e680be9..165fa80261b9 100644 --- a/website_and_docs/package-lock.json +++ b/website_and_docs/package-lock.json @@ -9,8 +9,8 @@ "version": "0.1.0", "license": "Apache-2.0", "dependencies": { - "autoprefixer": "^10.4.19", - "postcss": "^8.4.40", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", "postcss-cli": "^11.0.0" } }, @@ -503,9 +503,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", @@ -552,9 +552,10 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -576,9 +577,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "funding": [ { "type": "opencollective", @@ -593,9 +594,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -1243,9 +1245,9 @@ } }, "nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==" }, "node-releases": { "version": "2.0.18", @@ -1268,9 +1270,9 @@ "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==" }, "picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "picomatch": { "version": "2.3.1", @@ -1283,12 +1285,12 @@ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" }, "postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "requires": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, diff --git a/website_and_docs/package.json b/website_and_docs/package.json index d94a42dcb15e..aa478f4859f3 100644 --- a/website_and_docs/package.json +++ b/website_and_docs/package.json @@ -9,8 +9,8 @@ "author": "SeleniumHQ", "license": "Apache-2.0", "dependencies": { - "autoprefixer": "^10.4.19", - "postcss": "^8.4.40", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", "postcss-cli": "^11.0.0" } } diff --git a/website_and_docs/static/images/blog/2024/selenium_4.26.jpg b/website_and_docs/static/images/blog/2024/selenium_4.26.jpg new file mode 100644 index 000000000000..0e3e76f9f5d6 Binary files /dev/null and b/website_and_docs/static/images/blog/2024/selenium_4.26.jpg differ diff --git a/website_and_docs/static/images/blog/2024/selenium_4.27.webp b/website_and_docs/static/images/blog/2024/selenium_4.27.webp new file mode 100644 index 000000000000..583d828c6fd7 Binary files /dev/null and b/website_and_docs/static/images/blog/2024/selenium_4.27.webp differ