diff --git a/.github/workflows/dotnet-examples.yml b/.github/workflows/dotnet-examples.yml index 7959146d6a01..448219ad3d7f 100644 --- a/.github/workflows/dotnet-examples.yml +++ b/.github/workflows/dotnet-examples.yml @@ -21,28 +21,28 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu, windows, macos ] release: [ stable, nightly ] - runs-on: ${{ matrix.os }} + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up .Net Stable if: matrix.release == 'stable' @@ -58,7 +58,7 @@ jobs: env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Update Nightly version non-Windows - if: matrix.release == 'nightly' && matrix.os != 'windows-latest' + if: matrix.release == 'nightly' && matrix.os != 'windows' run: | latest_nightly=$(./scripts/latest-nightly-version.sh nuget Selenium.WebDriver) @@ -67,7 +67,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update Nightly version Windows - if: matrix.release == 'nightly' && matrix.os == 'windows-latest' + if: matrix.release == 'nightly' && matrix.os == 'windows' shell: pwsh run: | diff --git a/.github/workflows/java-examples.yml b/.github/workflows/java-examples.yml index 3d1bf9b44054..8cea55ce5f95 100644 --- a/.github/workflows/java-examples.yml +++ b/.github/workflows/java-examples.yml @@ -21,28 +21,28 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu, windows, macos ] release: [ stable, nightly ] - runs-on: ${{ matrix.os }} + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up Java uses: actions/setup-java@v4 @@ -59,7 +59,7 @@ jobs: cd examples/java mvn -B test - name: Run Tests Nightly Linux/macOS - if: matrix.release == 'nightly' && matrix.os != 'windows-latest' + if: matrix.release == 'nightly' && matrix.os != 'windows' uses: nick-invision/retry@v3.0.0 with: timeout_minutes: 20 @@ -73,7 +73,7 @@ jobs: mvn -B -U test -Dselenium.version="$latest_snapshot" - name: Run Tests Nightly Windows - if: matrix.release == 'nightly' && matrix.os == 'windows-latest' + if: matrix.release == 'nightly' && matrix.os == 'windows' uses: nick-invision/retry@v3.0.0 with: timeout_minutes: 20 diff --git a/.github/workflows/js-examples.yml b/.github/workflows/js-examples.yml index 7efd4f7bf201..b2cfd6964dd1 100644 --- a/.github/workflows/js-examples.yml +++ b/.github/workflows/js-examples.yml @@ -21,13 +21,13 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu, windows, macos ] release: [ stable, nightly ] - runs-on: ${{ matrix.os }} + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 @@ -42,41 +42,41 @@ jobs: edge-version: stable id: setup-edge - name: Install Firefox for set binary test - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' uses: browser-actions/setup-firefox@v1 with: firefox-version: latest id: setup-firefox - name: Set ENV Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV - name: Set ENV Mac - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV" echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV" - name: Set ENV Linux - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV" echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV" - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Setup Node Stable if: matrix.release == 'stable' @@ -90,7 +90,7 @@ jobs: node-version: '18.x' registry-url: 'https://npm.pkg.github.com' - name: Use Nightly package.json in Ubuntu/macOS - if: matrix.release == 'nightly' && matrix.os != 'windows-latest' + if: matrix.release == 'nightly' && matrix.os != 'windows' run: | latest_nightly=$(./scripts/latest-nightly-version.sh npm selenium-webdriver) @@ -99,7 +99,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Use Nightly package.json in Windows - if: matrix.release == 'nightly' && matrix.os == 'windows-latest' + if: matrix.release == 'nightly' && matrix.os == 'windows' run: | $latest_nightly = ./scripts/latest-nightly-version.ps1 npm selenium-webdriver diff --git a/.github/workflows/kotlin-examples.yml b/.github/workflows/kotlin-examples.yml index 2ec5636ba2b8..51d5bc3225c9 100644 --- a/.github/workflows/kotlin-examples.yml +++ b/.github/workflows/kotlin-examples.yml @@ -21,12 +21,12 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] - runs-on: ${{ matrix.os }} + os: [ ubuntu, windows, macos ] + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 @@ -41,41 +41,41 @@ jobs: edge-version: stable id: setup-edge - name: Install Firefox for set binary test - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' uses: browser-actions/setup-firefox@v1 with: firefox-version: latest id: setup-firefox - name: Set ENV Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV - name: Set ENV Mac - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV" echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV" - name: Set ENV Linux - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: | echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV" echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV" echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV" - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up Java uses: actions/setup-java@v4 diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 644c0c88dfcf..91e00fa1d8d0 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -21,28 +21,28 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu, windows, macos ] release: [ stable, nightly ] - runs-on: ${{ matrix.os }} + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/ruby-examples.yml b/.github/workflows/ruby-examples.yml index fc0f4f2f0dcc..447351266060 100644 --- a/.github/workflows/ruby-examples.yml +++ b/.github/workflows/ruby-examples.yml @@ -21,28 +21,28 @@ env: GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} jobs: - test_examples: + tests: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu, windows, macos ] release: [ stable, nightly ] - runs-on: ${{ matrix.os }} + runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo uses: actions/checkout@v4 - name: Remove driver directories Windows - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows' run: | rm "$env:ChromeWebDriver" -r -v rm "$env:EdgeWebDriver" -r -v rm "$env:GeckoWebDriver" -r -v - name: Remove driver directories Non-Windows - if: matrix.os != 'windows-latest' + if: matrix.os != 'windows' run: | sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER - name: Start Xvfb - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu' run: Xvfb :99 & - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -50,7 +50,7 @@ jobs: ruby-version: 3.0 bundler-cache: true - name: Install Gems Nightly non-Windows - if: matrix.release == 'nightly' && matrix.os != 'windows-latest' + if: matrix.release == 'nightly' && matrix.os != 'windows' run: | latest_nightly_webdriver=$(./scripts/latest-nightly-version.sh rubygems selenium-webdriver) @@ -61,7 +61,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install Gems Nightly Windows - if: matrix.release == 'nightly' && matrix.os == 'windows-latest' + if: matrix.release == 'nightly' && matrix.os == 'windows' run: | $latest_nightly_webdriver = ./scripts/latest-nightly-version.ps1 rubygems selenium-webdriver diff --git a/examples/dotnet/SeleniumDocs/BaseTest.cs b/examples/dotnet/SeleniumDocs/BaseTest.cs index f574b1792b67..6be2da8d3706 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.21.0.jar"; + private const string ServerJarName = "selenium-server-4.22.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/Interactions/WindowsTest.cs b/examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs index eadb93b523ac..f362ad3ba154 100644 --- a/examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs +++ b/examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs @@ -1,9 +1,49 @@ +using System; using Microsoft.VisualStudio.TestTools.UnitTesting; - +using OpenQA.Selenium; +using OpenQA.Selenium.Chrome; +using System.Collections.Generic; namespace SeleniumDocs.Interactions { [TestClass] - public class WindowsTest : BaseTest + public class WindowsTest { + [TestMethod] + public void TestWindowCommands() + { + WebDriver driver = new ChromeDriver(); + driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(500); + + // Navigate to Url + driver.Url="https://www.selenium.dev/selenium/web/window_switching_tests/page_with_frame.html"; + //fetch handle of this + String currHandle = driver.CurrentWindowHandle; + Assert.IsNotNull(currHandle); + + //click on link to open a new window + driver.FindElement(By.LinkText("Open new window")).Click(); + //fetch handles of all windows, there will be two, [0]- default, [1] - new window + IList windowHandles = new List(driver.WindowHandles); + driver.SwitchTo().Window(windowHandles[1]); + //assert on title of new window + String title = driver.Title; + Assert.AreEqual("Simple Page", title); + + //closing current window + driver.Close(); + //Switch back to the old tab or window + driver.SwitchTo().Window(windowHandles[0]); + + //Opens a new tab and switches to new tab + driver.SwitchTo().NewWindow(WindowType.Tab); + Assert.AreEqual("", driver.Title); + + //Opens a new window and switches to new window + driver.SwitchTo().NewWindow(WindowType.Window); + Assert.AreEqual("", driver.Title); + + //quitting driver + driver.Quit(); //close all windows + } } -} \ No newline at end of file +} diff --git a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj index 0857990c926f..59110e9908f6 100644 --- a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj +++ b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj @@ -7,7 +7,7 @@ - + diff --git a/examples/java/build.gradle b/examples/java/build.gradle index 3bbe3fbf76cc..5192d2265361 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -10,8 +10,8 @@ repositories { } dependencies { - testImplementation 'org.seleniumhq.selenium:selenium-java:4.21.0' - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2' + testImplementation 'org.seleniumhq.selenium:selenium-java:4.22.0' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.3' } test { diff --git a/examples/java/gradle/wrapper/gradle-wrapper.properties b/examples/java/gradle/wrapper/gradle-wrapper.properties index b82aa23a4f05..a4413138c96c 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.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/examples/java/gradlew b/examples/java/gradlew index 1aa94a426907..b740cf13397a 100755 --- a/examples/java/gradlew +++ b/examples/java/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. diff --git a/examples/java/pom.xml b/examples/java/pom.xml index 056b9fddcd67..106db1a15eb5 100644 --- a/examples/java/pom.xml +++ b/examples/java/pom.xml @@ -40,7 +40,7 @@ org.junit.jupiter junit-jupiter-engine - 5.10.2 + 5.10.3 test @@ -55,7 +55,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.3.0 diff --git a/examples/javascript/package-lock.json b/examples/javascript/package-lock.json index df25e075e9b4..b7b7218a8c78 100644 --- a/examples/javascript/package-lock.json +++ b/examples/javascript/package-lock.json @@ -13,13 +13,13 @@ "selenium-webdriver": "4.22.0" }, "devDependencies": { - "mocha": "10.4.0" + "mocha": "10.6.0" } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -249,9 +249,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -307,9 +307,9 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -791,9 +791,9 @@ } }, "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -803,31 +803,31 @@ } }, "node_modules/mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", + "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", "dev": true, "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -1032,9 +1032,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -1178,9 +1178,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { @@ -1255,9 +1255,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -1293,9 +1293,9 @@ }, "dependencies": { "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-regex": { @@ -1467,9 +1467,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "requires": { "ms": "2.1.2" @@ -1502,9 +1502,9 @@ } }, "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, "emoji-regex": { @@ -1833,40 +1833,40 @@ } }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" } }, "mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", + "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", "dev": true, "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "dependencies": { "ms": { @@ -2017,9 +2017,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -2129,9 +2129,9 @@ } }, "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { @@ -2179,9 +2179,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yargs-unparser": { diff --git a/examples/javascript/package.json b/examples/javascript/package.json index 970674d6ca9b..b21c65b2f304 100644 --- a/examples/javascript/package.json +++ b/examples/javascript/package.json @@ -11,6 +11,6 @@ "selenium-webdriver": "4.22.0" }, "devDependencies": { - "mocha": "10.4.0" + "mocha": "10.6.0" } } diff --git a/examples/kotlin/pom.xml b/examples/kotlin/pom.xml index c5e1fc72b01e..df6ecaa5e03b 100644 --- a/examples/kotlin/pom.xml +++ b/examples/kotlin/pom.xml @@ -14,7 +14,7 @@ 2.0.13 1.5.6 - 5.10.2 + 5.10.3 5.2.3 3.3.0 diff --git a/examples/python/requirements.txt b/examples/python/requirements.txt index afb42daf8cfa..2b291462bc86 100644 --- a/examples/python/requirements.txt +++ b/examples/python/requirements.txt @@ -1,4 +1,4 @@ -selenium==4.21.0 +selenium==4.22.0 pytest trio pytest-trio diff --git a/examples/python/tests/conftest.py b/examples/python/tests/conftest.py index 9cb9a9ed56e0..5f49c94a1dc8 100644 --- a/examples/python/tests/conftest.py +++ b/examples/python/tests/conftest.py @@ -130,7 +130,7 @@ def server_old(request): os.path.abspath(__file__) ) ), - "selenium-server-4.21.0.jar", + "selenium-server-4.22.0.jar", ) def wait_for_server(url, timeout): @@ -188,7 +188,7 @@ def server(): ) ) ), - "selenium-server-4.21.0.jar", + "selenium-server-4.22.0.jar", ) args = [ diff --git a/examples/ruby/Gemfile b/examples/ruby/Gemfile index 1a24d47fe55c..1cc486bd36ca 100644 --- a/examples/ruby/Gemfile +++ b/examples/ruby/Gemfile @@ -6,6 +6,6 @@ gem 'ffi', '~> 1.15', '>= 1.15.5' if Gem.win_platform? # Windows only gem 'rake', '~> 13.0' gem 'rspec', '~> 3.0' gem 'rubocop', '~> 1.35' -gem 'rubocop-rspec', '~> 2.12' -gem 'selenium-devtools', '= 0.125.0' +gem 'rubocop-rspec', '~> 3.0' +gem 'selenium-devtools', '= 0.126.0' gem 'selenium-webdriver', '= 4.22.0' \ No newline at end of file diff --git a/examples/ruby/Gemfile.lock b/examples/ruby/Gemfile.lock index c8799b2be573..40453d53de67 100644 --- a/examples/ruby/Gemfile.lock +++ b/examples/ruby/Gemfile.lock @@ -7,15 +7,15 @@ GEM json (2.7.2) language_server-protocol (3.17.0.3) logger (1.6.0) - parallel (1.24.0) - parser (3.3.2.0) + parallel (1.25.1) + parser (3.3.3.0) ast (~> 2.4.1) racc racc (1.8.0) rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.0) + rexml (3.3.1) strscan rspec (3.13.0) rspec-core (~> 3.13.0) @@ -43,20 +43,11 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.3) parser (>= 3.3.1.0) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) - rubocop (~> 1.41) - rubocop-rspec (2.31.0) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) - rubocop-rspec_rails (~> 2.28) - rubocop-rspec_rails (2.28.3) - rubocop (~> 1.40) + rubocop-rspec (3.0.2) + rubocop (~> 1.61) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-devtools (0.125.0) + selenium-devtools (0.126.0) selenium-webdriver (~> 4.2) selenium-webdriver (4.22.0) base64 (~> 0.2) @@ -80,8 +71,8 @@ DEPENDENCIES rake (~> 13.0) rspec (~> 3.0) rubocop (~> 1.35) - rubocop-rspec (~> 2.12) - selenium-devtools (= 0.125.0) + rubocop-rspec (~> 3.0) + selenium-devtools (= 0.126.0) selenium-webdriver (= 4.22.0) BUNDLED WITH diff --git a/examples/ruby/spec/elements/finders_spec.rb b/examples/ruby/spec/elements/finders_spec.rb index 9918bb1d4b1b..f6523ea029fd 100644 --- a/examples/ruby/spec/elements/finders_spec.rb +++ b/examples/ruby/spec/elements/finders_spec.rb @@ -4,4 +4,39 @@ RSpec.describe 'Element Finders' do let(:driver) { start_session } + + context 'without executing finders', skip: 'these are just examples, not actual tests' do + it 'finds the first matching element' do + driver.find_element(class: 'tomatoes') + end + + it 'uses a subset of the dom to find an element' do + fruits = driver.find_element(id: 'fruits') + fruit = fruits.find_element(class: 'tomatoes') + end + + it 'uses an optimized locator' do + fruit = driver.find_element(css: '#fruits .tomatoes') + end + + it 'finds all matching elements' do + plants = driver.find_elements(tag_name: 'li') + end + + it 'gets an element from a collection' do + elements = driver.find_elements(:tag_name,'p') + elements.each { |e| puts e.text } + end + + it 'finds element from element' do + element = driver.find_element(:tag_name,'div') + elements = element.find_elements(:tag_name,'p') + elements.each { |e| puts e.text } + end + + it 'find active element' do + driver.find_element(css: '[name="q"]').send_keys('webElement') + attr = driver.switch_to.active_element.attribute('title') + end + end end diff --git a/examples/selenium-server-4.21.0.jar b/examples/selenium-server-4.22.0.jar similarity index 87% rename from examples/selenium-server-4.21.0.jar rename to examples/selenium-server-4.22.0.jar index 9c23041f0b12..fba2db22cf44 100644 Binary files a/examples/selenium-server-4.21.0.jar and b/examples/selenium-server-4.22.0.jar differ diff --git a/website_and_docs/content/blog/2024/browserstack-selenium-partnership.md b/website_and_docs/content/blog/2024/browserstack-selenium-partnership.md new file mode 100644 index 000000000000..717ccd133137 --- /dev/null +++ b/website_and_docs/content/blog/2024/browserstack-selenium-partnership.md @@ -0,0 +1,22 @@ +--- +title: "Celebrating a Milestone: BrowserStack Becomes Selenium's Development Partner" +linkTitle: "Celebrating a Milestone: BrowserStack Becomes Selenium's Development Partner" +date: 2024-07-01 +tags: ["selenium"] +categories: ["general"] +author: David Burns [@automatedtester](https://www.linkedin.com/in/theautomatedtester/) +description: > + Selenium is proud to annouce that we have created a new tier to show the appreciation of the companies that support us. +--- + +It has been a great year for the Selenium community as it continues to grow. The popularity of Selenium’s Python Bindings is evident from the discussions at the Selenium Conference and on LinkedIn, while the Java bindings have impressively surpassed 100 million downloads. + +This project, having reached 20 years old this year, would not be possible without the amazing contributions from our volunteer contributors and the Open Source Program Offices of companies like BrowserStack that allow us to work on this project as part of our day jobs. + +**About BrowserStack** +They have over 50,000 organizations and 6M users using their end-to-end testing platform. BrowserStack has been one of the Selenium project's biggest supporters for years and currently employs several of Selenium's core maintainers, donating a significant portion of their time towards the development, maintenance, support, and leadership of open-source Selenium repos. + +This dedicated support has allowed us to continue work on the client bindings, especially the work going into WebDriver BiDi, support our community, continuously improve our documentation, and maintain all the extra projects we oversee, ensuring Selenium can continue to thrive for the next 20 years. +We are also thrilled to highlight the collaborative efforts between the BrowserStack team, the Google Chrome team, Microsoft, Apple, SauceLabs, and the Firefox team, who have come together to build Selenium WebDriver BiDi, the next generation of Selenium. This collaborative spirit embodies our dedication to enhancing the testing experience for the Selenium user community. +With this in mind, the Selenium Project now shows our appreciation to BrowserStack for their years of continued support by creating a new sponsorship tier called the Development Partner. +We are deeply indebted to BrowserStack for all their support and are proud to recognize them as our first official Development Partner. This work has allowed us to continue progress on the client bindings, especially the work going into WebDriver BiDi, support our community, continuously improve our documentation, and maintain all the extra projects we oversee, so Selenium can continue to be around for the next 20 years! diff --git a/website_and_docs/content/blog/2024/saucelabs-selenium-partnership.md b/website_and_docs/content/blog/2024/saucelabs-selenium-partnership.md new file mode 100644 index 000000000000..6feec7c4f1c1 --- /dev/null +++ b/website_and_docs/content/blog/2024/saucelabs-selenium-partnership.md @@ -0,0 +1,70 @@ +--- +title: "Sauce Labs: A New Milestone with Selenium" +linkTitle: "Sauce Labs & Selenium Partnership" +date: 2024-07-02 +tags: ["selenium"] +categories: ["general"] +author: David Burns [@automatedtester](https://www.linkedin.com/in/theautomatedtester/) +images: + - "/images/blog/saucelabs-selenium-partnership.jpeg" +description: > + Announcing a new Development partnership tier with Sauce Labs, celebrating our supporters! +--- + +Selenium has witnessed an exceptional year filled with expansion and progress. The rising +popularity of Selenium's Python Bindings is prominently showcased through the engaging +discussions at the Selenium Conference and on LinkedIn. Concurrently, the Java bindings have +reached a significant landmark, surpassing 100 million downloads. In addition to this, +the community has managed to garner over [2.5 million active](https://plausible.io/manager.selenium.dev) +Selenium users monthly. + +We could not have achieved Selenium's 20th anniversary without the collective efforts of numerous +volunteers and the invaluable assistance of a company like [Sauce Labs](https://saucelabs.com/resources/topic-hub/selenium?utm_source=selenium&utm_medium=website&utm_campaign=selenium-sponsorship-fy25). + +In 2008, Jason Huggins, Selenium's creator, established Sauce Labs, a company that has since +played a crucial role in Selenium's expansion. + +Sauce Labs has provided a platform for the Selenium Project to display its accomplishments, +including various keynotes at SauceCon. Here, figures like Simon Stewart and Jim Evans have been +able to share their visions for the future of Selenium. + +Financially, Sauce Labs has substantially supported the Selenium Project, sponsoring both the +project itself and the Selenium Conference over many years. This backing has been instrumental +in allowing the project to flourish. + +Selenium thrives on collaboration, and Sauce Labs has been a vital facilitator. They have +enabled the Selenium Project to host in-person events like the Test Automation Summit in Berlin +in 2022. These gatherings have provided opportunities for members of the Selenium Project to +engage with creators of different testing frameworks, fostering discussions on ecosystem +improvements. Sauce Labs has also hosted Selenium Dev Summits, where the project's future has +been a central topic. + +Sauce Labs contributions extend beyond financial support. They have significantly contributed +to the technical and organizational well-being of the Selenium Project. Boni Garcia developed +the first version of Selenium Manager while at Sauce Labs. Furthermore, several Sauce Labs +employees, including Marcus Merrell, Diego Molina, and Titus Fortner, continue contributing +to the Selenium project, driven by their passion. This passion is shared by Sauce Labs, +enabling these contributions to be part of their daily work. + +This unwavering support has nurtured a project governed openly, not by a single entity, but +by the community. This model has welcomed diverse contributors, including Google Chrome, +Microsoft, Apple, LambdaTest, Applitools, BrowserStack, and Mozilla Firefox teams. Together, they +have developed WebDriver BiDi, the next generation of WebDriver. + +The project's open governance and collaborative nature have allowed continuous work on client +bindings, particularly WebDriver BiDi, community support, documentation improvements, and +maintenance of additional projects. + +Sauce Labs has been an unnamed development partner for the Selenium Project for many years. +With this in mind, the Selenium Project now shows its appreciation to Sauce Labs for their +years of continued support by creating a new sponsorship tier called the Development Partner +and naming Sauce Labs the first and official Development Partner. + +Sauce Labs has Selenium in its DNA, and Selenium has Sauce Labs in its DNA. This partnership +celebrates their shared history and future. We are excited to see what the future holds for +both Selenium and Sauce Labs, and we are excited to continue to work together for the next +twenty years. + +If you want to learn more about this partnership and win a limited edition t-shirt, check +[How Did Sauce Labs Get Its Name? A Selenium Story](https://saucelabs.com/resources/blog/selenium-and-sauce-labs). + diff --git a/website_and_docs/content/documentation/selenium_manager.en.md b/website_and_docs/content/documentation/selenium_manager.en.md index 4c300f5ed149..1fabb70e67ec 100644 --- a/website_and_docs/content/documentation/selenium_manager.en.md +++ b/website_and_docs/content/documentation/selenium_manager.en.md @@ -118,7 +118,7 @@ The following table summarizes all the supported arguments supported by Selenium |`--browser-path `|`browser-path = "BROWSER_PATH"`|`SE_BROWSER_PATH=BROWSER_PATH`|Browser path (absolute) for browser version detection (e.g., `/usr/bin/google-chrome`, `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`, `C:\Program Files\Google\Chrome\Application\chrome.exe`)| |`--driver-mirror-url `|`driver-mirror-url = "DRIVER_MIRROR_URL"`|`SE_DRIVER_MIRROR_URL=DRIVER_MIRROR_URL`|Mirror URL for driver repositories| |`--browser-mirror-url `|`browser-mirror-url = "BROWSER_MIRROR_URL"`|`SE_BROWSER_MIRROR_URL=BROWSER_MIRROR_URL`|Mirror URL for browser repositories| -|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), or `SHELL` (Unix-like). Default: `LOGGER`| +|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), `SHELL` (Unix-like), or `MIXED` (`INFO`, `WARN`, `DEBUG`, etc. to stderr and minimal `JSON` to stdout). Default: `LOGGER`| |`--os `|`os = "OS"`|`SE_OS=OS`|Operating system for drivers and browsers (i.e., `windows`, `linux`, or `macos`)| |`--arch `|`arch = "ARCH"`|`SE_ARCH=ARCH`|System architecture for drivers and browsers (i.e., `x32`, `x64`, or `arm64`)| |`--proxy `|`proxy = "PROXY"`|`SE_PROXY=PROXY`|HTTP proxy for network connection (e.g., `myproxy:port`, `myuser:mypass@myproxy:port`)| diff --git a/website_and_docs/content/documentation/selenium_manager.ja.md b/website_and_docs/content/documentation/selenium_manager.ja.md index 4c300f5ed149..1fabb70e67ec 100644 --- a/website_and_docs/content/documentation/selenium_manager.ja.md +++ b/website_and_docs/content/documentation/selenium_manager.ja.md @@ -118,7 +118,7 @@ The following table summarizes all the supported arguments supported by Selenium |`--browser-path `|`browser-path = "BROWSER_PATH"`|`SE_BROWSER_PATH=BROWSER_PATH`|Browser path (absolute) for browser version detection (e.g., `/usr/bin/google-chrome`, `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`, `C:\Program Files\Google\Chrome\Application\chrome.exe`)| |`--driver-mirror-url `|`driver-mirror-url = "DRIVER_MIRROR_URL"`|`SE_DRIVER_MIRROR_URL=DRIVER_MIRROR_URL`|Mirror URL for driver repositories| |`--browser-mirror-url `|`browser-mirror-url = "BROWSER_MIRROR_URL"`|`SE_BROWSER_MIRROR_URL=BROWSER_MIRROR_URL`|Mirror URL for browser repositories| -|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), or `SHELL` (Unix-like). Default: `LOGGER`| +|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), `SHELL` (Unix-like), or `MIXED` (`INFO`, `WARN`, `DEBUG`, etc. to stderr and minimal `JSON` to stdout). Default: `LOGGER`| |`--os `|`os = "OS"`|`SE_OS=OS`|Operating system for drivers and browsers (i.e., `windows`, `linux`, or `macos`)| |`--arch `|`arch = "ARCH"`|`SE_ARCH=ARCH`|System architecture for drivers and browsers (i.e., `x32`, `x64`, or `arm64`)| |`--proxy `|`proxy = "PROXY"`|`SE_PROXY=PROXY`|HTTP proxy for network connection (e.g., `myproxy:port`, `myuser:mypass@myproxy:port`)| 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 4c300f5ed149..1fabb70e67ec 100644 --- a/website_and_docs/content/documentation/selenium_manager.pt-br.md +++ b/website_and_docs/content/documentation/selenium_manager.pt-br.md @@ -118,7 +118,7 @@ The following table summarizes all the supported arguments supported by Selenium |`--browser-path `|`browser-path = "BROWSER_PATH"`|`SE_BROWSER_PATH=BROWSER_PATH`|Browser path (absolute) for browser version detection (e.g., `/usr/bin/google-chrome`, `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`, `C:\Program Files\Google\Chrome\Application\chrome.exe`)| |`--driver-mirror-url `|`driver-mirror-url = "DRIVER_MIRROR_URL"`|`SE_DRIVER_MIRROR_URL=DRIVER_MIRROR_URL`|Mirror URL for driver repositories| |`--browser-mirror-url `|`browser-mirror-url = "BROWSER_MIRROR_URL"`|`SE_BROWSER_MIRROR_URL=BROWSER_MIRROR_URL`|Mirror URL for browser repositories| -|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), or `SHELL` (Unix-like). Default: `LOGGER`| +|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), `SHELL` (Unix-like), or `MIXED` (`INFO`, `WARN`, `DEBUG`, etc. to stderr and minimal `JSON` to stdout). Default: `LOGGER`| |`--os `|`os = "OS"`|`SE_OS=OS`|Operating system for drivers and browsers (i.e., `windows`, `linux`, or `macos`)| |`--arch `|`arch = "ARCH"`|`SE_ARCH=ARCH`|System architecture for drivers and browsers (i.e., `x32`, `x64`, or `arm64`)| |`--proxy `|`proxy = "PROXY"`|`SE_PROXY=PROXY`|HTTP proxy for network connection (e.g., `myproxy:port`, `myuser:mypass@myproxy:port`)| 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 4c300f5ed149..1fabb70e67ec 100644 --- a/website_and_docs/content/documentation/selenium_manager.zh-cn.md +++ b/website_and_docs/content/documentation/selenium_manager.zh-cn.md @@ -118,7 +118,7 @@ The following table summarizes all the supported arguments supported by Selenium |`--browser-path `|`browser-path = "BROWSER_PATH"`|`SE_BROWSER_PATH=BROWSER_PATH`|Browser path (absolute) for browser version detection (e.g., `/usr/bin/google-chrome`, `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`, `C:\Program Files\Google\Chrome\Application\chrome.exe`)| |`--driver-mirror-url `|`driver-mirror-url = "DRIVER_MIRROR_URL"`|`SE_DRIVER_MIRROR_URL=DRIVER_MIRROR_URL`|Mirror URL for driver repositories| |`--browser-mirror-url `|`browser-mirror-url = "BROWSER_MIRROR_URL"`|`SE_BROWSER_MIRROR_URL=BROWSER_MIRROR_URL`|Mirror URL for browser repositories| -|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), or `SHELL` (Unix-like). Default: `LOGGER`| +|`--output `|`output = "OUTPUT"`|`SE_OUTPUT=OUTPUT`|Output type: `LOGGER` (using `INFO`, `WARN`, etc.), `JSON` (custom JSON notation), `SHELL` (Unix-like), or `MIXED` (`INFO`, `WARN`, `DEBUG`, etc. to stderr and minimal `JSON` to stdout). Default: `LOGGER`| |`--os `|`os = "OS"`|`SE_OS=OS`|Operating system for drivers and browsers (i.e., `windows`, `linux`, or `macos`)| |`--arch `|`arch = "ARCH"`|`SE_ARCH=ARCH`|System architecture for drivers and browsers (i.e., `x32`, `x64`, or `arm64`)| |`--proxy `|`proxy = "PROXY"`|`SE_PROXY=PROXY`|HTTP proxy for network connection (e.g., `myproxy:port`, `myuser:mypass@myproxy:port`)| 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 ed4a2b47c7ee..4817f03645df 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.en.md @@ -102,7 +102,7 @@ Apple provides a development version of their browser — [Safari Technology Pre {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L36-L37" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 130fdcd14ba9..4f19d559e64f 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/safari.ja.md @@ -102,7 +102,7 @@ To use this version in your code: {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L36-L37" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 0938cba998fd..fa20eaf45597 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 @@ -102,7 +102,7 @@ To use this version in your code: {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L36-L37" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 27aee894728a..ceea608372d3 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 @@ -47,25 +47,28 @@ val driver = SafariDriver(options) {{< /tabpane >}} ### 移动端 -那些希望在iOS上自动化Safari的人可以参考 [Appium project](//appium.io/). +那些希望在iOS上自动化Safari的人可以参考 [Appium 项目](//appium.io/). -## Service +## 服务 -Service settings common to all browsers are described on the [Service page]({{< ref "../drivers/service.md" >}}). +所有浏览器通用的服务设置在 [服务页面]({{< ref "../drivers/service.md" >}}). -### Logging +### 日志 -Unlike other browsers, Safari doesn't let you choose where logs are output, or change levels. The one option -available is to turn logs off or on. If logs are toggled on, they can be found at:`~/Library/Logs/com.apple.WebDriver/`. +与其他浏览器不同, +Safari 浏览器不允许您选择日志的输出位置或更改级别. +一个可用选项是关闭或打开日志. +如果日志处于打开状态, +则可以在以下位置找到它们: `~/Library/Logs/com.apple.WebDriver/`. {{< tabpane text=true >}} {{% tab header="Java" %}} {{< badge-version version="4.10" >}} {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/browsers/SafariTest.java#L31" >}} -**Note**: Java also allows setting console output by System Property;\ -Property key: `SafariDriverService.SAFARI_DRIVER_LOGGING`\ -Property value: `"true"` or `"false"` +**注意**: Java也允许使用环境变量进行设置;\ +属性键: `SafariDriverService.SAFARI_DRIVER_LOGGING`\ +属性值: `"true"` 或 `"false"` {{% /tab %}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/browsers/test_safari.py#L17" >}} @@ -88,8 +91,9 @@ Property value: `"true"` or `"false"` ## Safari Technology Preview -Apple provides a development version of their browser — [Safari Technology Preview](https://developer.apple.com/safari/technology-preview/) -To use this version in your code: +Apple 提供了其浏览器的开发版本 — [Safari Technology Preview](https://developer.apple.com/safari/technology-preview/) + +在代码中使用此版本: {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -102,7 +106,7 @@ To use this version in your code: {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L36-L37" >}} +{{< gh-codeblock path="examples/ruby/spec/browsers/safari_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 7641a04b9799..7b39c11f1dce 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md @@ -36,7 +36,7 @@ on the local machine. {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L13" >}} +{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 9d0618d53b9f..39c2880c24d1 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md @@ -36,7 +36,7 @@ weight: 3 {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L13" >}} +{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 1bc26292c686..b76b49b7535f 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 @@ -36,7 +36,7 @@ on the local machine. {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L13" >}} +{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 0c20c48f8551..29d293539b6c 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 @@ -36,7 +36,7 @@ weight: 3 {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L13" >}} +{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/options.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/options.zh-cn.md index ec76f2c51c62..24a2ec75ff20 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/options.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/options.zh-cn.md @@ -30,7 +30,7 @@ aliases: [ ## browserName -Browser name is set by default when using an Options class instance. +默认情况下,使用 Options 类实例时会设置浏览器名称. {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -56,9 +56,10 @@ Browser name is set by default when using an Options class instance. ## browserVersion -This capability is optional, this is used to set the available browser version at remote end. -In recent versions of Selenium, if the version is not found on the system, -it will be automatically downloaded by [Selenium Manager]({{< ref "../../selenium_manager" >}}) +此功能是可选的,用于在远程端设置可用的浏览器版本. +在最新版本的 Selenium 中,如果在系统上找不到该版本, +它将被 [Selenium Manager]({{< ref "../../selenium_manager" >}}) 自动下载 + {{< tabpane text=true >}} {{< tab header="Java" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/service.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/service.zh-cn.md index 5cbb335a767a..23429833aba5 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/service.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/service.zh-cn.md @@ -1,20 +1,20 @@ --- -title: "Driver Service Class" +title: "驱动服务类" linkTitle: "服务" weight: 3 --- 服务类用于管理驱动程序的启动和停止. -They can not be used with a Remote WebDriver session. +它们不能与远程 WebDriver 会话一起使用. -Service classes allow you to specify information about the driver, -like location and which port to use. -They also let you specify what arguments get passed -to the command line. Most of the useful arguments are related to logging. +服务类允许您指定有关驱动程序的信息, +诸如位置和要使用的端口. +它们还允许您指定传递哪些参数到命令行. +大多数有用的参数都与日志记录有关. -## Default Service instance +## 默认服务实例 -To start a driver with a default service instance: +使用默认服务实例启动驱动程序: {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -38,10 +38,12 @@ To start a driver with a default service instance: {{< /tab >}} {{< /tabpane >}} -## Driver location +## 驱动程序位置 -**Note:** If you are using Selenium 4.6 or greater, you shouldn't need to set a driver location. -If you can not update Selenium or have an advanced use case here is how to specify the driver location: +**注意:** 如果您使用的是 Selenium 4.6 或更高版本, +则无需设置驱动程序位置. +如果您无法更新 Selenium 或有高阶用法需求, +以下是指定驱动程序位置的方法: {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -67,9 +69,10 @@ If you can not update Selenium or have an advanced use case here is how to speci {{< /tab >}} {{< /tabpane >}} -## Driver port +## 驱动程序端口 -If you want the driver to run on a specific port, you may specify it as follows: +如果希望驱动程序在特定端口上运行, +您可以在启动时指定端口号, 如下所示: {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -95,10 +98,11 @@ If you want the driver to run on a specific port, you may specify it as follows: {{< /tabpane >}} -## Logging +## 日志 -Logging functionality varies between browsers. Most browsers allow you to -specify location and level of logs. Take a look at the respective browser page: +日志记录功能因浏览器而异. +大多数浏览器都允许您指定日志的位置和级别. +请查看相应的浏览器页面: * [Chrome]({{< ref "../browsers/chrome#service" >}}) * [Edge]({{< ref "../browsers/edge#service" >}}) * [Firefox]({{< ref "../browsers/firefox#service" >}}) diff --git a/website_and_docs/content/documentation/webdriver/elements/finders.en.md b/website_and_docs/content/documentation/webdriver/elements/finders.en.md index a1c0d3f9867a..89ccc3c77c74 100644 --- a/website_and_docs/content/documentation/webdriver/elements/finders.en.md +++ b/website_and_docs/content/documentation/webdriver/elements/finders.en.md @@ -52,9 +52,9 @@ vegetable = driver.find_element(By.CLASS_NAME, "tomatoes") {{< tab header="CSharp" >}} var vegetable = driver.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -vegetable = driver.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L14-L15">}} +{{< /tab >}} {{< tab header="JavaScript" >}} const vegetable = await driver.findElement(By.className('tomatoes')); {{< /tab >}} @@ -87,10 +87,9 @@ fruit = fruits.find_element(By.CLASS_NAME,"tomatoes") IWebElement fruits = driver.FindElement(By.Id("fruits")); IWebElement fruit = fruits.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruits = driver.find_element(id: 'fruits') -fruit = fruits.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L14-L15">}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruits = await driver.findElement(By.id('fruits')); const fruit = fruits.findElement(By.className('tomatoes')); @@ -131,9 +130,9 @@ fruit = driver.find_element(By.CSS_SELECTOR,"#fruits .tomatoes") {{< tab header="CSharp" >}} var fruit = driver.FindElement(By.CssSelector("#fruits .tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruit = driver.find_element(css: '#fruits .tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L19" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruit = await driver.findElement(By.css('#fruits .tomatoes')); {{< /tab >}} @@ -161,9 +160,9 @@ plants = driver.find_elements(By.TAG_NAME, "li") {{< tab header="CSharp" >}} IReadOnlyList plants = driver.FindElements(By.TagName("li")); {{< /tab >}} - {{< tab header="Ruby" >}} -plants = driver.find_elements(tag_name: 'li') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L23" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const plants = await driver.findElements(By.tagName('li')); {{< /tab >}} @@ -227,23 +226,9 @@ namespace FindElementsExample { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -driver = Selenium::WebDriver.for :firefox -begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get all the elements available with tag name 'p' - elements = driver.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } -ensure - driver.quit -end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L27-L28" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); (async function example() { @@ -359,26 +344,9 @@ namespace FindElementsFromElement { } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get element with tag name 'div' - element = driver.find_element(:tag_name,'div') - - # Get all the elements available with tag name 'p' - elements = element.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } - ensure - driver.quit - end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L32-L34" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); @@ -484,19 +452,8 @@ It is used to track (or) find DOM element which has the focus in the current bro } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - driver.get 'https://www.google.com' - driver.find_element(css: '[name="q"]').send_keys('webElement') - - # Get attribute of current active element - attr = driver.switch_to.active_element.attribute('title') - puts attr - ensure - driver.quit - end + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); diff --git a/website_and_docs/content/documentation/webdriver/elements/finders.ja.md b/website_and_docs/content/documentation/webdriver/elements/finders.ja.md index 80eb7813a38c..fb7ab88d8cdc 100644 --- a/website_and_docs/content/documentation/webdriver/elements/finders.ja.md +++ b/website_and_docs/content/documentation/webdriver/elements/finders.ja.md @@ -49,9 +49,9 @@ vegetable = driver.find_element(By.CLASS_NAME, "tomatoes") {{< tab header="CSharp" >}} var vegetable = driver.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -vegetable = driver.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L10" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const vegetable = await driver.findElement(By.className('tomatoes')); {{< /tab >}} @@ -81,10 +81,9 @@ fruit = fruits.find_element(By.CLASS_NAME,"tomatoes") IWebElement fruits = driver.FindElement(By.Id("fruits")); IWebElement fruit = fruits.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruits = driver.find_element(id: 'fruits') -fruit = fruits.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L14-L15" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruits = await driver.findElement(By.id('fruits')); const fruit = fruits.findElement(By.className('tomatoes')); @@ -121,9 +120,9 @@ fruit = driver.find_element(By.CSS_SELECTOR,"#fruits .tomatoes") {{< tab header="CSharp" >}} var fruit = driver.FindElement(By.CssSelector("#fruits .tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruit = driver.find_element(css: '#fruits .tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L19" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruit = await driver.findElement(By.css('#fruits .tomatoes')); {{< /tab >}} @@ -150,9 +149,9 @@ plants = driver.find_elements(By.TAG_NAME, "li") {{< tab header="CSharp" >}} IReadOnlyList plants = driver.FindElements(By.TagName("li")); {{< /tab >}} - {{< tab header="Ruby" >}} -plants = driver.find_elements(tag_name: 'li') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L23" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const plants = await driver.findElements(By.tagName('li')); {{< /tab >}} @@ -214,23 +213,9 @@ namespace FindElementsExample { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -driver = Selenium::WebDriver.for :firefox -begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get all the elements available with tag name 'p' - elements = driver.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } -ensure - driver.quit -end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L27-L28" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); (async function example() { @@ -345,26 +330,9 @@ namespace FindElementsFromElement { } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get element with tag name 'div' - element = driver.find_element(:tag_name,'div') - - # Get all the elements available with tag name 'p' - elements = element.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } - ensure - driver.quit - end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L32-L34" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); @@ -469,19 +437,8 @@ namespace FindElementsFromElement { } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - driver.get 'https://www.google.com' - driver.find_element(css: '[name="q"]').send_keys('webElement') - - # Get attribute of current active element - attr = driver.switch_to.active_element.attribute('title') - puts attr - ensure - driver.quit - end + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); diff --git a/website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md b/website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md index 78de20ff8bdf..4e27d33169d1 100644 --- a/website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/elements/finders.pt-br.md @@ -50,9 +50,9 @@ vegetable = driver.find_element(By.CLASS_NAME, "tomatoes") {{< tab header="CSharp" >}} var vegetable = driver.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -vegetable = driver.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L10" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const vegetable = await driver.findElement(By.className('tomatoes')); {{< /tab >}} @@ -83,10 +83,9 @@ fruit = fruits.find_element(By.CLASS_NAME,"tomatoes") IWebElement fruits = driver.FindElement(By.Id("fruits")); IWebElement fruit = fruits.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruits = driver.find_element(id: 'fruits') -fruit = fruits.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L14-L15" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruits = await driver.findElement(By.id('fruits')); const fruit = fruits.findElement(By.className('tomatoes')); @@ -125,9 +124,9 @@ fruit = driver.find_element(By.CSS_SELECTOR,"#fruits .tomatoes") {{< tab header="CSharp" >}} var fruit = driver.FindElement(By.CssSelector("#fruits .tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruit = driver.find_element(css: '#fruits .tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L19" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruit = await driver.findElement(By.css('#fruits .tomatoes')); {{< /tab >}} @@ -153,9 +152,9 @@ plants = driver.find_elements(By.TAG_NAME, "li") {{< tab header="CSharp" >}} IReadOnlyList plants = driver.FindElements(By.TagName("li")); {{< /tab >}} - {{< tab header="Ruby" >}} -plants = driver.find_elements(tag_name: 'li') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L23" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const plants = await driver.findElements(By.tagName('li')); {{< /tab >}} @@ -218,23 +217,9 @@ namespace FindElementsExample { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -driver = Selenium::WebDriver.for :firefox -begin - # Navegar até a URL - driver.get 'https://www.example.com' - - # Obtém todos os elementos disponiveis com o nome da tag 'p' - elements = driver.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } -ensure - driver.quit -end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L27-L28" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); (async function example() { @@ -349,26 +334,9 @@ namespace FindElementsFromElement { } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - # Navegar até a URL - driver.get 'https://www.example.com' - - # Obtém o elemento com o nome da tag 'div' - element = driver.find_element(:tag_name,'div') - - # Obtém todos os elementos disponíveis com o nome da tag 'p' - elements = element.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } - ensure - driver.quit - end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L32-L34" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); @@ -473,19 +441,8 @@ Ele é usado para rastrear (ou) encontrar um elemento DOM que tem o foco no cont } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - driver.get 'https://www.google.com' - driver.find_element(css: '[name="q"]').send_keys('webElement') - - # Obter atributo do elemento atualmente ativo - attr = driver.switch_to.active_element.attribute('title') - puts attr - ensure - driver.quit - end + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); diff --git a/website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md b/website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md index 3f6553c4719f..7edaa9f85ea0 100644 --- a/website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md @@ -52,9 +52,9 @@ vegetable = driver.find_element(By.CLASS_NAME, "tomatoes") {{< tab header="CSharp" >}} var vegetable = driver.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -vegetable = driver.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L10" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const vegetable = await driver.findElement(By.className('tomatoes')); {{< /tab >}} @@ -86,10 +86,9 @@ fruit = fruits.find_element(By.CLASS_NAME,"tomatoes") IWebElement fruits = driver.FindElement(By.Id("fruits")); IWebElement fruit = fruits.FindElement(By.ClassName("tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruits = driver.find_element(id: 'fruits') -fruit = fruits.find_element(class: 'tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L14-L15" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruits = await driver.findElement(By.id('fruits')); const fruit = fruits.findElement(By.className('tomatoes')); @@ -129,9 +128,9 @@ fruit = driver.find_element(By.CSS_SELECTOR,"#fruits .tomatoes") {{< tab header="CSharp" >}} var fruit = driver.FindElement(By.CssSelector("#fruits .tomatoes")); {{< /tab >}} - {{< tab header="Ruby" >}} -fruit = driver.find_element(css: '#fruits .tomatoes') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L19" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const fruit = await driver.findElement(By.css('#fruits .tomatoes')); {{< /tab >}} @@ -158,9 +157,9 @@ plants = driver.find_elements(By.TAG_NAME, "li") {{< tab header="CSharp" >}} IReadOnlyList plants = driver.FindElements(By.TagName("li")); {{< /tab >}} - {{< tab header="Ruby" >}} -plants = driver.find_elements(tag_name: 'li') - {{< /tab >}} +{{< tab header="Ruby" text=true >}} +{{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L23" >}} +{{< /tab >}} {{< tab header="JavaScript" >}} const plants = await driver.findElements(By.tagName('li')); {{< /tab >}} @@ -223,23 +222,9 @@ namespace FindElementsExample { } } {{< /tab >}} - {{< tab header="Ruby" >}} -require 'selenium-webdriver' -driver = Selenium::WebDriver.for :firefox -begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get all the elements available with tag name 'p' - elements = driver.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } -ensure - driver.quit -end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L27-L28" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); (async function example() { @@ -354,26 +339,9 @@ namespace FindElementsFromElement { } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - # Navigate to URL - driver.get 'https://www.example.com' - - # Get element with tag name 'div' - element = driver.find_element(:tag_name,'div') - - # Get all the elements available with tag name 'p' - elements = element.find_elements(:tag_name,'p') - - elements.each { |e| - puts e.text - } - ensure - driver.quit - end - {{< /tab >}} + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L32-L34" >}} + {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); @@ -478,19 +446,8 @@ It is used to track (or) find DOM element which has the focus in the current bro } } {{< /tab >}} - {{< tab header="Ruby" >}} - require 'selenium-webdriver' - driver = Selenium::WebDriver.for :chrome - begin - driver.get 'https://www.google.com' - driver.find_element(css: '[name="q"]').send_keys('webElement') - - # Get attribute of current active element - attr = driver.switch_to.active_element.attribute('title') - puts attr - ensure - driver.quit - end + {{< tab header="Ruby" text=true >}} + {{< gh-codeblock path="/examples/ruby/spec/elements/finders_spec.rb#L38-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} const {Builder, By} = require('selenium-webdriver'); diff --git a/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md b/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md index a5fef6cc76d1..dc5b48970e9e 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md @@ -16,7 +16,7 @@ Selenium所做的一切, 您将使用Selenium执行的大部分操作, 都是以下基本命令的组合 -Click on the link to "View full example on GitHub" to see the code in context. +点击 "View full example on GitHub" 的链接以查看上下文中的代码. ### 1. 使用驱动实例开启会话 @@ -217,7 +217,7 @@ Click on the link to "View full example on GitHub" to see the code in context. 默认情况下, 该进程也会关闭浏览器. 无法向此驱动程序实例发送更多命令. -See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). +详见 [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -241,7 +241,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). {{< /tabpane >}} -## Running Selenium File +## 运行 Selenium 文件 {{< tabpane text=true >}} {{< tab header="Java" >}} @@ -267,6 +267,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). ## 接下来的步骤 -Most Selenium users execute many sessions and need to organize them to minimize duplication and keep the code -more maintainable. Read on to learn about how to put this code into context for your use case with -[Using Selenium]({{< ref "using_selenium.md" >}}). +大多数 Selenium 用户执行许多会话, +需要组织它们以最大限度地减少重复并维持代码更易于维护. +请继续阅读,了解如何将此代码放入您用例的上下文中 +[使用 Selenium]({{< ref "using_selenium.md" >}}). diff --git a/website_and_docs/content/documentation/webdriver/interactions/windows.en.md b/website_and_docs/content/documentation/webdriver/interactions/windows.en.md index dcca990958f5..ac4e29e87fa7 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/windows.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/windows.en.md @@ -23,9 +23,9 @@ current window by using: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L16-L20" >}} {{< /tab >}} {{< tab header="Python" >}}driver.current_window_handle{{< /tab >}} - {{< tab header="CSharp" >}} - {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L14-L18" >}} - {{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L17-L21" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.window_handle{{< /tab >}} {{< tab header="JavaScript" >}}await driver.getWindowHandle();{{< /tab >}} {{< tab header="Kotlin" >}}driver.windowHandle{{< /tab >}} @@ -79,31 +79,11 @@ with webdriver.Firefox() as driver: # Wait for the new tab to finish loading content wait.until(EC.title_is("SeleniumHQ Browser Automation")) {{< /tab >}} - {{< tab header="CSharp" >}} -//Store the ID of the original window -string originalWindow = driver.CurrentWindowHandle; - -//Check we don't have other windows open already -Assert.AreEqual(driver.WindowHandles.Count, 1); - -//Click the link which opens in a new window -driver.FindElement(By.LinkText("new window")).Click(); - -//Wait for the new window or tab -wait.Until(wd => wd.WindowHandles.Count == 2); - -//Loop through until we find a new window handle -foreach(string window in driver.WindowHandles) -{ - if(originalWindow != window) - { - driver.SwitchTo().Window(window); - break; - } -} -//Wait for the new tab to finish loading content -wait.Until(wd => wd.Title == "Selenium documentation"); + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L23-L30" >}} {{< /tab >}} + {{< tab header="Ruby" >}} # Store the ID of the original window @@ -203,13 +183,11 @@ driver.close() #Switch back to the old tab or window driver.switch_to.window(original_window) {{< /tab >}} - {{< tab header="CSharp" >}} -//Close the tab or window -driver.Close(); - -//Switch back to the old tab or window -driver.SwitchTo().Window(originalWindow); + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L32-L35" >}} {{< /tab >}} + {{< tab header="Ruby" >}} #Close the tab or window driver.close @@ -259,13 +237,12 @@ driver.switch_to.new_window('tab') # Opens a new window and switches to new window driver.switch_to.new_window('window') {{< /tab >}} - {{< tab header="CSharp" >}} -// Opens a new tab and switches to new tab -driver.SwitchTo().NewWindow(WindowType.Tab) - -// Opens a new window and switches to new window -driver.SwitchTo().NewWindow(WindowType.Window) + + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L37-L43" >}} {{< /tab >}} + {{% tab header="Ruby" text=true %}} Opens a new tab and switches to new tab: {{< gh-codeblock path="/examples/ruby/spec/interactions/windows_spec.rb#L9" >}} @@ -302,7 +279,11 @@ instead of close: {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L44-L45" >}} {{< /tab >}} {{< tab header="Python" >}}driver.quit(){{< /tab >}} - {{< tab header="CSharp" >}}driver.Quit();{{< /tab >}} + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L45-L46" >}} + {{< /tab >}} + {{< tab header="Ruby" >}}driver.quit{{< /tab >}} {{< tab header="JavaScript" >}}await driver.quit();{{< /tab >}} {{< tab header="Kotlin" >}}driver.quit(){{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/windows.ja.md b/website_and_docs/content/documentation/webdriver/interactions/windows.ja.md index e742cb03420a..b97d8788f64b 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/windows.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/windows.ja.md @@ -21,9 +21,9 @@ WebDriverは、ウィンドウとタブを区別しません。 {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L16-L20" >}} {{< /tab >}} {{< tab header="Python" >}}driver.current_window_handle{{< /tab >}} - {{< tab header="CSharp" >}} - {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L14-L18" >}} - {{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L17-L21" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.window_handle{{< /tab >}} {{< tab header="JavaScript" >}}await driver.getWindowHandle();{{< /tab >}} {{< tab header="Kotlin" >}}driver.windowHandle{{< /tab >}} @@ -75,31 +75,12 @@ with webdriver.Firefox() as driver: # Wait for the new tab to finish loading content wait.until(EC.title_is("SeleniumHQ Browser Automation")) {{< /tab >}} - {{< tab header="CSharp" >}} -//Store the ID of the original window -string originalWindow = driver.CurrentWindowHandle; - -//Check we don't have other windows open already -Assert.AreEqual(driver.WindowHandles.Count, 1); - -//Click the link which opens in a new window -driver.FindElement(By.LinkText("new window")).Click(); - -//Wait for the new window or tab -wait.Until(wd => wd.WindowHandles.Count == 2); - -//Loop through until we find a new window handle -foreach(string window in driver.WindowHandles) -{ - if(originalWindow != window) - { - driver.SwitchTo().Window(window); - break; - } -} -//Wait for the new tab to finish loading content -wait.Until(wd => wd.Title == "Selenium documentation"); + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L23-L30" >}} {{< /tab >}} + + {{< tab header="Ruby" >}} #Store the ID of the original window original_window = driver.window_handle @@ -195,13 +176,12 @@ driver.close() #Switch back to the old tab or window driver.switch_to.window(original_window) {{< /tab >}} - {{< tab header="CSharp" >}} -//Close the tab or window -driver.Close(); -//Switch back to the old tab or window -driver.SwitchTo().Window(originalWindow); + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L32-L35" >}} {{< /tab >}} + + {{< tab header="Ruby" >}} #Close the tab or window driver.close @@ -247,13 +227,12 @@ driver.switch_to.new_window('tab') # Opens a new window and switches to new window driver.switch_to.new_window('window') {{< /tab >}} - {{< tab header="CSharp" >}} -// Opens a new tab and switches to new tab -driver.SwitchTo().NewWindow(WindowType.Tab) - -// Opens a new window and switches to new window -driver.SwitchTo().NewWindow(WindowType.Window) + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L37-L43" >}} {{< /tab >}} + + {{% tab header="Ruby" text=true %}} Opens a new tab and switches to new tab {{< gh-codeblock path="/examples/ruby/spec/interactions/windows_spec.rb#L9" >}} @@ -261,6 +240,7 @@ Opens a new tab and switches to new tab Opens a new window and switches to new window {{< gh-codeblock path="/examples/ruby/spec/interactions/windows_spec.rb#L15" >}} {{% /tab %}} + {{< tab header="JavaScript" text=true >}} Opens a new tab and switches to new tab {{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L70" >}} @@ -268,6 +248,7 @@ Opens a new tab and switches to new tab Opens a new window and switches to new window: {{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L75" >}} {{< /tab >}} + {{< tab header="Kotlin" >}} // Opens a new tab and switches to new tab driver.switchTo().newWindow(WindowType.TAB) @@ -275,6 +256,7 @@ driver.switchTo().newWindow(WindowType.TAB) // Opens a new window and switches to new window driver.switchTo().newWindow(WindowType.WINDOW) {{< /tab >}} + {{< /tabpane >}} @@ -287,7 +269,9 @@ driver.switchTo().newWindow(WindowType.WINDOW) {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L44-L45" >}} {{< /tab >}} {{< tab header="Python" >}}driver.quit(){{< /tab >}} - {{< tab header="CSharp" >}}driver.Quit();{{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L45-L46" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.quit{{< /tab >}} {{< tab header="JavaScript" >}}await driver.quit();{{< /tab >}} {{< tab header="Kotlin" >}}driver.quit(){{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/windows.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/windows.pt-br.md index 006e78279b35..7b3e82285176 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/windows.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/windows.pt-br.md @@ -21,9 +21,9 @@ persistente em uma única sessão. Você pode pegar o identificador atual usando {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L16-L20" >}} {{< /tab >}} {{< tab header="Python" >}}driver.current_window_handle{{< /tab >}} - {{< tab header="CSharp" >}} - {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L14-L18" >}} - {{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L17-L21" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.window_handle{{< /tab >}} {{< tab header="JavaScript" >}}await driver.getWindowHandle();{{< /tab >}} {{< tab header="Kotlin" >}}driver.windowHandle{{< /tab >}} @@ -81,31 +81,13 @@ with webdriver.Firefox() as driver: # Wait for the new tab to finish loading content wait.until(EC.title_is("SeleniumHQ Browser Automation")) {{< /tab >}} - {{< tab header="CSharp" >}} -//Store the ID of the original window -string originalWindow = driver.CurrentWindowHandle; -//Check we don't have other windows open already -Assert.AreEqual(driver.WindowHandles.Count, 1); - -//Click the link which opens in a new window -driver.FindElement(By.LinkText("new window")).Click(); + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L23-L30" >}} + {{< /tab >}} + -//Wait for the new window or tab -wait.Until(wd => wd.WindowHandles.Count == 2); -//Loop through until we find a new window handle -foreach(string window in driver.WindowHandles) -{ - if(originalWindow != window) - { - driver.SwitchTo().Window(window); - break; - } -} -//Wait for the new tab to finish loading content -wait.Until(wd => wd.Title == "Selenium documentation"); - {{< /tab >}} {{< tab header="Ruby" >}} #Store the ID of the original window original_window = driver.window_handle @@ -203,13 +185,11 @@ driver.close() #Switch back to the old tab or window driver.switch_to.window(original_window) {{< /tab >}} - {{< tab header="CSharp" >}} -//Close the tab or window -driver.Close(); -//Switch back to the old tab or window -driver.SwitchTo().Window(originalWindow); + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L32-L35" >}} {{< /tab >}} + {{< tab header="Ruby" >}} #Close the tab or window driver.close @@ -257,13 +237,12 @@ driver.switch_to.new_window('tab') # Opens a new window and switches to new window driver.switch_to.new_window('window') {{< /tab >}} - {{< tab header="CSharp" >}} -// Opens a new tab and switches to new tab -driver.SwitchTo().NewWindow(WindowType.Tab) - -// Opens a new window and switches to new window -driver.SwitchTo().NewWindow(WindowType.Window) + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L37-L43" >}} {{< /tab >}} + + {{% tab header="Ruby" text=true %}} Opens a new tab and switches to new tab {{< gh-codeblock path="/examples/ruby/spec/interactions/windows_spec.rb#L9" >}} @@ -301,7 +280,9 @@ em vez de fechar: {{< /tab >}} {{< tab header="Python" >}}driver.quit(){{< /tab >}} - {{< tab header="CSharp" >}}driver.Quit();{{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L45-L46" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.quit{{< /tab >}} {{< tab header="JavaScript" >}}await driver.quit();{{< /tab >}} {{< tab header="Kotlin" >}}driver.quit(){{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/windows.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/windows.zh-cn.md index 6a7a1e5d2a3c..cd5ddd41832e 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/windows.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/windows.zh-cn.md @@ -17,9 +17,9 @@ WebDriver 没有区分窗口和标签页。如果你的站点打开了一个新 {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L16-L20" >}} {{< /tab >}} {{< tab header="Python" >}}driver.current_window_handle{{< /tab >}} - {{< tab header="CSharp" >}} - {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L14-L18" >}} - {{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L17-L21" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.window_handle{{< /tab >}} {{< tab header="JavaScript" >}}await driver.getWindowHandle();{{< /tab >}} {{< tab header="Kotlin" >}}driver.windowHandle{{< /tab >}} @@ -74,29 +74,11 @@ driver.get("https://seleniumhq.github.io") # 等待新标签页完成加载内容 wait.until(EC.title_is("SeleniumHQ Browser Automation")) {{< /tab >}} -{{< tab header="CSharp" >}} -// 存储原始窗口的 ID -string originalWindow = driver.CurrentWindowHandle; -// 检查一下,我们还没有打开其他的窗口 -Assert.AreEqual(driver.WindowHandles.Count, 1); - -// 单击在新窗口中打开的链接 -driver.FindElement(By.LinkText("new window")).Click(); - -// 等待新窗口或标签页 -wait.Until(wd => wd.WindowHandles.Count == 2); + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L23-L30" >}} + {{< /tab >}} -// 循环执行,直到找到一个新的窗口句柄 -foreach(string window in driver.WindowHandles) -{if(originalWindow != window) -{driver.SwitchTo().Window(window); -break; -} -} -// 等待新标签页完成加载内容 -wait.Until(wd => wd.Title == "Selenium documentation"); -{{< /tab >}} {{< tab header="Ruby" >}} # 存储原始窗口的 ID original_window = driver.window_handle @@ -188,13 +170,11 @@ driver.close() #切回到之前的标签页或窗口 driver.switch_to.window(original_window) {{< /tab >}} -{{< tab header="CSharp" >}} -//关闭标签页或窗口 -driver.Close(); -//切回到之前的标签页或窗口 -driver.SwitchTo().Window(originalWindow); -{{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L32-L35" >}} + {{< /tab >}} + {{< tab header="Ruby" >}} #关闭标签页或窗口 driver.close @@ -240,13 +220,12 @@ driver.switch_to.new_window('tab') # 打开一个新窗口并切换到新窗口 driver.switch_to.new_window('window') {{< /tab >}} -{{< tab header="CSharp" >}} -// 打开新标签页并切换到新标签页 -driver.SwitchTo().NewWindow(WindowType.Tab) - -// 打开一个新窗口并切换到新窗口 -driver.SwitchTo().NewWindow(WindowType.Window) -{{< /tab >}} + + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L37-L43" >}} + {{< /tab >}} + + {{% tab header="Ruby" text=true %}} 打开新标签页并切换到新标签页 {{< gh-codeblock path="/examples/ruby/spec/interactions/windows_spec.rb#L9" >}} @@ -283,7 +262,9 @@ driver.switchTo().newWindow(WindowType.WINDOW) {{< /tab >}} {{< tab header="Python" >}}driver.quit(){{< /tab >}} -{{< tab header="CSharp" >}}driver.Quit();{{< /tab >}} + {{< tab header="CSharp" text=true >}} + {{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L45-L46" >}} + {{< /tab >}} {{< tab header="Ruby" >}}driver.quit{{< /tab >}} {{< tab header="JavaScript" >}}await driver.quit();{{< /tab >}} {{< tab header="Kotlin" >}}driver.quit(){{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/support_features/expected_conditions.zh-cn.md b/website_and_docs/content/documentation/webdriver/support_features/expected_conditions.zh-cn.md index 729ccb3908a1..f9ce68fb0c46 100644 --- a/website_and_docs/content/documentation/webdriver/support_features/expected_conditions.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/support_features/expected_conditions.zh-cn.md @@ -1,23 +1,23 @@ --- -title: "Waiting with Expected Conditions" -linkTitle: "Expected Conditions" +title: "期望状态的等待" +linkTitle: "期望状态" weight: 1 description: > - These are classes used to describe what needs to be waited for. + 本文档描述了一系列类, 这些类用于明确指定在测试中需要等待的各种条件. --- -Expected Conditions are used with [Explicit Waits]({{< ref "../waits#explicit-waits" >}}). -Instead of defining the block of code to be executed with a _lambda_, an expected -conditions method can be created to represent common things that get waited on. Some -methods take locators as arguments, others take elements as arguments. +期望状态与 [显示等待]({{< ref "../waits#explicit-waits" >}}) 一起使用. +与其定义要使用 _lambda_ 执行的代码块, +不如使用 _lambda_ 执行可以创建 Conditions 方法来表示等待的常见事物. +有些方法将定位器作为参数, 有些方法将元素作为参数. -These methods can include conditions such as: +这些方法可以包括以下条件: -* element exists -* element is stale -* element is visible -* text is visible -* title contains specified value +* 元素存在 +* 元素已过期 +* 元素可见 +* 文本可见 +* 标题包含特定值 {{< tabpane text=true >}} {{% tab header="Java" %}} diff --git a/website_and_docs/data/sponsors.yml b/website_and_docs/data/sponsors.yml index 9f81f39ed1aa..5b09f926be6e 100644 --- a/website_and_docs/data/sponsors.yml +++ b/website_and_docs/data/sponsors.yml @@ -94,6 +94,10 @@ bronze: # Set to false if no items are present enable: true item: + # Sponsorship start date: Jul 5, 2024 + - logo: "/images/sponsors/rtts-logo.jpg" + url: "https://www.rttsweb.com/?utm_source=Selenium-org&utm_medium=ads&utm_campaign=Selenium-sponsor" + name: "Real-Time Technology Solutions Inc." # Sponsorship start date: Mar 20, 2023 - logo: "/images/sponsors/kiwiqa-logo.png" url: "https://www.kiwiqa.com/" diff --git a/website_and_docs/hugo.toml b/website_and_docs/hugo.toml index b8fc1a395458..a6877bbe77cf 100644 --- a/website_and_docs/hugo.toml +++ b/website_and_docs/hugo.toml @@ -164,7 +164,8 @@ plausible_analytics = true prism_syntax_highlighting = true # Enable announcement banner below navbar (Go to announcement-banner.html to change the message) -announcement_banner = true +banner_flag = false +announcement_banner = false # Enable Algolia DocSearch [params.search.algolia] diff --git a/website_and_docs/layouts/downloads/list.html b/website_and_docs/layouts/downloads/list.html index 8d9b46875a3f..a691621a48aa 100644 --- a/website_and_docs/layouts/downloads/list.html +++ b/website_and_docs/layouts/downloads/list.html @@ -25,7 +25,7 @@

Latest stable version - 4.21.0 + 4.22.0

To use the Selenium Server in a Grid configuration see the @@ -107,7 +107,7 @@

C# NuGet

- Nuget latest release is 4.21.0 Released on May 16, 2024. + Nuget latest release is 4.22.0 Released on Jun 21, 2024.

  • 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 bde1e3e243b8..edc9e1a6ed81 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.21.0 (May 16, 2024) + 4.22.0 (Jun 21, 2024)

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

    Selenium Clients and WebDriver Language Bin

    Stable: - - 4.21.0 (May 16, 2024) + + 4.22.0 (Jun 20, 2024)

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

    Selenium Clients and WebDriver Language Bin

    Stable: - - 4.21.0 (May 16, 2024) + + 4.22.0 (Jun 21, 2024)

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

    Selenium Clients and WebDriver Language Bin

    Stable: - 4.21.0 (May 16, 2024) + 4.22.0 (Jun 21, 2024)

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

    Selenium Clients and WebDriver Language Bin

    Stable: - 4.21.0 (May 16, 2024) + 4.22.0 (Jun 21, 2024)

    diff --git a/website_and_docs/layouts/shortcodes/blocks/section.html b/website_and_docs/layouts/shortcodes/blocks/section.html index 23d1b9bb9b25..d0cee7a8a187 100644 --- a/website_and_docs/layouts/shortcodes/blocks/section.html +++ b/website_and_docs/layouts/shortcodes/blocks/section.html @@ -1,9 +1,9 @@ {{ $_hugo_config := `{ "version": 1 }` }} {{ $col_id := .Get "color" | default .Ordinal }} {{ $height := .Get "height" | default "auto" }} -{{ $type := .Get "type" | default "" }} +{{ $type := .Get "type" | default "" }} -

    +
    {{ if eq .Page.File.Ext "md" }} diff --git a/website_and_docs/package-lock.json b/website_and_docs/package-lock.json index fd1a3e438a9e..74983e3efd90 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.14", - "postcss": "^8.4.31", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.39", "postcss-cli": "^11.0.0" } }, @@ -136,11 +136,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -301,9 +302,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -453,6 +455,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -549,9 +552,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -573,9 +577,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "funding": [ { "type": "opencollective", @@ -590,9 +594,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { @@ -822,6 +827,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1008,11 +1014,11 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -1110,9 +1116,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } @@ -1264,9 +1270,9 @@ "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==" }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "picomatch": { "version": "2.3.1", @@ -1279,12 +1285,12 @@ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" }, "postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "requires": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" } }, diff --git a/website_and_docs/package.json b/website_and_docs/package.json index ff36349248b0..c47fbe3d0953 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.14", - "postcss": "^8.4.31", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.39", "postcss-cli": "^11.0.0" } } diff --git a/website_and_docs/static/images/blog/saucelabs-selenium-partnership.jpeg b/website_and_docs/static/images/blog/saucelabs-selenium-partnership.jpeg new file mode 100644 index 000000000000..34575e304c44 Binary files /dev/null and b/website_and_docs/static/images/blog/saucelabs-selenium-partnership.jpeg differ diff --git a/website_and_docs/static/images/sponsors/rtts-logo.jpg b/website_and_docs/static/images/sponsors/rtts-logo.jpg new file mode 100644 index 000000000000..fc7730656aee Binary files /dev/null and b/website_and_docs/static/images/sponsors/rtts-logo.jpg differ