diff --git a/.bazelignore b/.bazelignore index 7dbb22ecb417b..e920cea308429 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,5 +1,25 @@ buck-out +dotnet/test/firefox/bin +dotnet/test/firefox/obj +dotnet/test/edge/bin +dotnet/test/edge/obj +dotnet/test/common/bin +dotnet/test/common/obj +dotnet/test/support/bin +dotnet/test/support/obj +dotnet/test/safari/bin +dotnet/test/safari/obj +dotnet/test/chrome/bin +dotnet/test/chrome/obj +dotnet/test/ie/bin +dotnet/test/ie/obj +dotnet/test/remote/bin +dotnet/test/remote/obj +dotnet/src/support/bin +dotnet/src/support/obj +dotnet/src/webdriver/bin +dotnet/src/webdriver/obj +java/build/production java/client/build java/server/build node_modules -java/build/production diff --git a/.bazelrc b/.bazelrc index ea23ac61e3548..825edc7a2f634 100644 --- a/.bazelrc +++ b/.bazelrc @@ -16,9 +16,9 @@ build --java_runtime_version=remotejdk_17 build --tool_java_language_version=17 build --tool_java_runtime_version=remotejdk_17 -# We target java 8 by default +# We target java 11 by default -build --javacopt="--release 8" +build --javacopt="--release 11" # Require java dependencies to be used and first-order @@ -47,20 +47,20 @@ build --test_output=errors # pass environment variables to the test environment -build --test_env=CI -build --test_env=DASHBOARD_URL -build --test_env=DISPLAY -build --test_env=FIREFOX_NIGHTLY_BINARY -build --test_env=GITHUB_ACTIONS -build --test_env=MOZ_HEADLESS -build --test_env=PATH # Remove once browser pinning works -build --test_env=SELENIUM_BROWSER -build --test_env=TRAVIS -build --test_env=PYTHON_VERSION +test --test_env=CI +test --test_env=DASHBOARD_URL +test --test_env=DISPLAY +test --test_env=FIREFOX_NIGHTLY_BINARY +test --test_env=GITHUB_ACTIONS +test --test_env=MOZ_HEADLESS +test --test_env=PATH # Remove once browser pinning works +test --test_env=SELENIUM_BROWSER +test --test_env=TRAVIS +test --test_env=PYTHON_VERSION # Remove once rules_ruby support proper $LOAD_PATH expansion. -build --test_env=RUBYOPT="-Irb/lib -w" +test --test_env=RUBYOPT="-Irb/lib -w" # JRuby/TruffleRuby: https://github.com/jruby/jruby/issues/5661 @@ -113,11 +113,12 @@ build:remote --disk_cache= build:remote --incompatible_enable_cc_toolchain_resolution build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 test:remote --test_env=DISPLAY=:99.0 -test:remote --test_tag_filters=-edge,-safari,-remote +test:remote --test_tag_filters=-skip-remote,-remote # Env vars we can hard code build:remote --action_env=HOME=/home/dev build:remote --action_env=PATH=/bin:/usr/bin:/usr/local/bin +test:remote --test_env=PATH=/bin:/usr/bin:/usr/local/bin test:remote --test_env=HOME=/home/dev # Make sure we sniff credentials properly @@ -146,3 +147,7 @@ build:remote-ci --bes_upload_mode=wait_for_upload_complete # Configuration changes suggested by EngFlow build:remote --grpc_keepalive_time=30s build:remote --nolegacy_important_outputs + +build:release --config=remote +build:release --stamp +build:release --remote_download_outputs=toplevel diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 201fa59406196..aca34a0191f00 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,4 +5,52 @@ updates: schedule: interval: daily time: '08:00' - open-pull-requests-limit: 99 + open-pull-requests-limit: 0 + labels: + - "C-build" + - "dependencies" + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: daily + time: '08:00' + open-pull-requests-limit: 0 + labels: + - "C-nodejs" + - "dependencies" + - package-ecosystem: "bundler" + directory: "/" + schedule: + interval: daily + time: '08:00' + open-pull-requests-limit: 0 + labels: + - "C-rb" + - "dependencies" + - package-ecosystem: "cargo" + directory: "/rust" + schedule: + interval: daily + time: '08:00' + open-pull-requests-limit: 0 + labels: + - "C-rust" + - "dependencies" + - package-ecosystem: "pip" + directory: "/py" + schedule: + interval: daily + time: '08:00' + open-pull-requests-limit: 0 + labels: + - "C-py" + - "dependencies" + - package-ecosystem: "nuget" + directory: "/dotnet" + schedule: + interval: daily + time: '08:00' + open-pull-requests-limit: 0 + labels: + - "C-dotnet" + - "dependencies" diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml index 229fa69428f38..a4733b7d647b2 100644 --- a/.github/label-commenter-config.yml +++ b/.github/label-commenter-config.yml @@ -129,3 +129,11 @@ labels: This issue is looking for contributors. Please comment below or reach out to us through our [IRC/Slack/Matrix channels](https://www.selenium.dev/support/) if you are interested. + - name: I-logging + labeled: + issue: + body: | + We need more information about this issue in order to troubleshoot. + + Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our + [Troubleshooting documentation](https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/). diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 9999a6d905124..9dcfc56b7365f 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -70,10 +70,10 @@ jobs: - name: Remove driver directories Non-Windows if: inputs.os != 'windows' run: | - sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER + sudo rm -rf "$CHROMEWEBDRIVER" "$EDGEWEBDRIVER" "$GECKOWEBDRIVER" - name: Set Ruby version if: inputs.ruby-version != '' - run: echo 'RUBY_VERSION = "${{ inputs.ruby-version }}"' > rb/ruby_version.bzl + run: echo '${{ inputs.ruby-version }}' > rb/.ruby-version - name: Setup Java if: inputs.java-version != '' uses: actions/setup-java@v3 @@ -81,9 +81,10 @@ jobs: java-version: ${{ inputs.java-version }} distribution: 'temurin' - name: Setup Bazel - uses: p0deje/setup-bazel@0.2.0 + uses: p0deje/setup-bazel@0.3.2 with: bazelisk-cache: true + bazelrc: common --color=yes disk-cache: ${{ inputs.cache-key }} external-cache: | name: ${{ inputs.cache-key }} @@ -99,7 +100,7 @@ jobs: sudo apt-get -y install fluxbox Xvfb :99 & fluxbox -display :99 & - echo "DISPLAY=:99" >> $GITHUB_ENV + echo "DISPLAY=:99" >> "$GITHUB_ENV" - name: Set resolution if: inputs.os == 'windows' && inputs.browser != '' run: Set-DisplayResolution -Width 1920 -Height 1080 -Force diff --git a/.github/workflows/build-selenium-manager.yml b/.github/workflows/build-selenium-manager.yml index 92880db927845..ce57455ccd0df 100644 --- a/.github/workflows/build-selenium-manager.yml +++ b/.github/workflows/build-selenium-manager.yml @@ -1,32 +1,53 @@ name: Build selenium-manager -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + debug: + description: 'Include debug symbols in binaries' + required: false + type: boolean jobs: win32: name: "[Windows x32] Build selenium-manager" runs-on: windows-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 - name: "Update Rust" run: | rustup update + - name: "Build release binary" + if: ${{ inputs.debug == false }} + run: | rustup toolchain install stable-i686-pc-windows-msvc rustup default stable-i686-pc-windows-msvc rustc -vV - - name: "Build release" - run: | cd rust cargo build --release - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_windows-x32 path: rust/target/release/selenium-manager.exe retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + rustup toolchain install stable-i686-pc-windows-gnu + rustup default stable-i686-pc-windows-gnu + rustc -vV + cd rust + cargo build --profile dev + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_windows-x32-debug + path: rust/target/debug/selenium-manager.exe + retention-days: 6 linux64: name: "[Linux x64] Build selenium-manager" @@ -42,26 +63,38 @@ jobs: run: | cargo install cross --git https://github.com/cross-rs/cross cross -V - - name: "Build release" + - name: "Build release binary" + if: ${{ inputs.debug == false }} run: | cd rust cross build --target x86_64-unknown-linux-musl --release - - name: "Tar binary (to keep executable permission)" - run: | - cd rust/target/x86_64-unknown-linux-musl/release + cd target/x86_64-unknown-linux-musl/release tar -cvf ../../../../selenium-manager.tar selenium-manager - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_linux-x64 path: selenium-manager.tar retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + cd rust + cross build --target x86_64-unknown-linux-musl --profile dev + cd target/x86_64-unknown-linux-musl/debug + tar -cvf ../../../../selenium-manager.tar selenium-manager + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_linux-x64-debug + path: selenium-manager.tar + retention-days: 6 macos64: name: "[macOS x64/arm64] Build selenium-manager" runs-on: macos-latest - env: - RUSTFLAGS: '-Ctarget-feature=+crt-static' steps: - name: "Checkout project" uses: actions/checkout@v4 @@ -70,28 +103,39 @@ jobs: rustup update rustup target add aarch64-apple-darwin rustc -vV - - name: "Build x64" - run: | - cd rust - cargo build --release --target x86_64-apple-darwin - - name: "Build arm64" + - name: "Build release binary" + if: ${{ inputs.debug == false }} run: | cd rust - cargo build --release --target aarch64-apple-darwin - - name: "Build universal" - run: | - cd rust - lipo -create \ - -output target/selenium-manager \ + cargo build --target x86_64-apple-darwin --release + cargo build --target aarch64-apple-darwin --release + lipo -create -output target/selenium-manager \ target/aarch64-apple-darwin/release/selenium-manager \ target/x86_64-apple-darwin/release/selenium-manager - - name: "Tar binary (to keep executable permission)" - run: | - cd rust/target + cd target tar -cvf ../../selenium-manager.tar selenium-manager - - name: "Upload binary" + - name: "Upload release binary" + if: ${{ inputs.debug == false }} uses: actions/upload-artifact@v3 with: name: selenium-manager_macos-universal path: selenium-manager.tar retention-days: 6 + - name: "Build debug binary" + if: ${{ inputs.debug == true }} + run: | + cd rust + cargo build --target x86_64-apple-darwin --profile dev + cargo build --target aarch64-apple-darwin --profile dev + lipo -create -output target/selenium-manager \ + target/aarch64-apple-darwin/debug/selenium-manager \ + target/x86_64-apple-darwin/debug/selenium-manager + cd target + tar -cvf ../../selenium-manager.tar selenium-manager + - name: "Upload debug binary" + if: ${{ inputs.debug == true }} + uses: actions/upload-artifact@v3 + with: + name: selenium-manager_macos-universal-debug + path: selenium-manager.tar + retention-days: 6 \ No newline at end of file diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 848bb09da1399..5778ead45f911 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -12,34 +12,17 @@ jobs: name: Build cache-key: false os: windows - run: bazel build //dotnet/src/webdriver:package //dotnet/src/support:package + run: | + bazel build //dotnet/src/webdriver --stamp + bazel build //dotnet/src/support --stamp integration-tests: name: Browser Tests - needs: build uses: ./.github/workflows/bazel.yml - strategy: - fail-fast: false - matrix: - driver: - - Chrome - - Firefox - framework: - - net48 - - net6.0 - include: - - driver: Chrome - browser: chrome - - driver: Firefox - browser: chrome with: - name: Browser Tests (${{ matrix.driver }}, ${{ matrix.framework }}) - browser: ${{ matrix.browser }} + name: Browser Tests cache-key: false java-version: 17 os: windows run: | - bazel build //dotnet/test/common:${{ matrix.browser }} - $env:ACTIVE_DRIVER_CONFIG = '${{ matrix.driver }}' - cd dotnet - dotnet test test/common/WebDriver.Common.Tests.csproj --framework ${{ matrix.framework }} + bazel test //dotnet/test/common:ElementFindingTest-firefox //dotnet/test/common:ElementFindingTest-chrome --pin_browsers=true --stamp diff --git a/.github/workflows/ci-java.yml b/.github/workflows/ci-java.yml index ce3f6955d10e3..af6492bbb4240 100644 --- a/.github/workflows/ci-java.yml +++ b/.github/workflows/ci-java.yml @@ -5,96 +5,36 @@ on: workflow_dispatch: jobs: - build: - name: Build - uses: ./.github/workflows/bazel.yml - with: - name: Build - cache-key: java - run: bazel build grid - - docs: - name: Documentation - needs: build - uses: ./.github/workflows/bazel.yml - with: - name: Documentation - cache-key: java-doc - run: ./go --verbose javadocs - - lint: - name: Lint - needs: build - uses: ./.github/workflows/bazel.yml - with: - name: Lint - cache-key: java-lint - run: bazel test --test_tag_filters "lint,-no-lint" //java/... - - small-tests: - name: Small Tests - needs: build - uses: ./.github/workflows/bazel.yml - with: - name: Small Tests - cache-key: java-small-tests - run: bazel test --test_size_filters "small" --test_tag_filters "-lint" //java/... - - medium-tests: - name: Medium Tests - needs: small-tests - uses: ./.github/workflows/bazel.yml - with: - name: Medium Tests - cache-key: java-medium-tests - run: bazel test --test_size_filters "medium" --test_tag_filters "-lint" --flaky_test_attempts 3 //java/... - browser-tests: name: Browser Tests - needs: small-tests uses: ./.github/workflows/bazel.yml strategy: fail-fast: false matrix: include: - - browser: chrome - browser-version: stable - - browser: firefox - browser-version: latest - - browser: firefox - browser-version: latest-beta - - browser: firefox - browser-version: latest-devedition + - os: windows + - os: macos with: - name: Browser Tests (${{ matrix.browser }}, ${{ matrix.browser-version }}) - browser: ${{ matrix.browser }} - browser-version: ${{ matrix.browser-version }} - cache-key: java-${{ matrix.browser }}-tests + name: Browser Tests (chrome, ${{ matrix.os }}) + os: ${{ matrix.os }} + browser: chrome + cache-key: java-${{ matrix.os }}-tests run: > - bazel query "attr(tags, ${{ matrix.browser }}, tests(//java/...)) except attr(tags, 'rc|remote', tests(//java/...))" | - xargs bazel test --flaky_test_attempts 3 + bazel test //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest remote-tests: name: Remote Tests - needs: small-tests uses: ./.github/workflows/bazel.yml strategy: fail-fast: false matrix: include: - - browser: chrome - browser-version: stable - - browser: firefox - browser-version: latest - - browser: firefox - browser-version: latest-beta - - browser: firefox - browser-version: latest-devedition + - os: windows + - os: macos with: - name: Remote Tests (${{ matrix.browser }}, ${{ matrix.browser-version }}) - browser: ${{ matrix.browser }} - browser-version: ${{ matrix.browser-version }} - cache-key: java-${{ matrix.browser }}-remote-tests + name: Remote Tests (chrome, ${{ matrix.os }}) + os: ${{ matrix.os }} + browser: chrome + cache-key: java-${{ matrix.os }}-remote-tests run: > - bazel query "attr(tags, ${{ matrix.browser }}, tests(//java/...)) intersect attr(tags, 'remote', tests(//java/...))" | - xargs bazel test --flaky_test_attempts 3 + bazel test //java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote diff --git a/.github/workflows/ci-javascript.yml b/.github/workflows/ci-javascript.yml index 384de680d1578..bf3c5c4fa6d04 100644 --- a/.github/workflows/ci-javascript.yml +++ b/.github/workflows/ci-javascript.yml @@ -12,21 +12,6 @@ jobs: name: Build cache-key: javascript-build run: bazel build //javascript/node/selenium-webdriver:selenium-webdriver - - atoms: - name: Atom Tests - needs: build - uses: ./.github/workflows/bazel.yml - with: - name: Atom Tests - browser: firefox - cache-key: atoms - run: > - bazel test --test_tag_filters=firefox - //javascript/atoms/... - //javascript/selenium-atoms/... - //javascript/webdriver/... - browser-tests: name: Browser Tests needs: build @@ -55,7 +40,7 @@ jobs: - name: Checkout source tree uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 16 - name: NPM install diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 5d09c6d971136..9749fd4e7ad82 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -77,34 +77,9 @@ jobs: env: TOXENV: mypy - unit-tests: - name: Unit Tests - needs: build - uses: ./.github/workflows/bazel.yml - with: - name: Unit Tests - cache-key: py-unit - run: bazel test //py:unit - - browser-tests: - name: Browser Tests - needs: unit-tests - uses: ./.github/workflows/bazel.yml - strategy: - fail-fast: false - matrix: - browser: - - chrome - - firefox - with: - name: Integration Tests (${{ matrix.browser }}) - browser: ${{ matrix.browser }} - cache-key: py-${{ matrix.browser }} - run: bazel test --flaky_test_attempts 3 //py:test-${{ matrix.browser }} - remote-tests: name: Remote Tests - needs: unit-tests + needs: build uses: ./.github/workflows/bazel.yml with: name: Integration Tests (remote) diff --git a/.github/workflows/ci-rbe.yml b/.github/workflows/ci-rbe.yml index 881f67492d254..3b4c36d9212f2 100644 --- a/.github/workflows/ci-rbe.yml +++ b/.github/workflows/ci-rbe.yml @@ -20,6 +20,7 @@ jobs: name: Test uses: ./.github/workflows/bazel.yml with: + # TODO: experiment with turning off caches name: All RBE tests cache-key: rbe ruby-version: jruby-9.4.2.0 diff --git a/.github/workflows/ci-ruby.yml b/.github/workflows/ci-ruby.yml index 80ced414f5fef..5f59315a1f805 100644 --- a/.github/workflows/ci-ruby.yml +++ b/.github/workflows/ci-ruby.yml @@ -43,13 +43,13 @@ jobs: os: ubuntu - ruby-version: 3.0.6 os: windows - - ruby-version: 3.2.0 - os: ubuntu - - ruby-version: 3.2.0 + - ruby-version: 3.0.6 os: macos - - ruby-version: jruby-9.4.0.0 + - ruby-version: 3.2.2 + os: ubuntu + - ruby-version: jruby-9.4.5.0 os: ubuntu - - ruby-version: truffleruby-22.3.0 + - ruby-version: truffleruby-23.1.1 os: ubuntu with: name: Unit Tests (${{ matrix.ruby-version }}, ${{ matrix.os }}) @@ -102,29 +102,21 @@ jobs: strategy: fail-fast: false matrix: - browser: - - chrome - - edge - - firefox - - safari - os: - - ubuntu - - windows - - macos - exclude: + include: - browser: edge + os: windows + - browser: chrome os: ubuntu - - browser: edge - os: macos - - browser: safari + - browser: firefox os: ubuntu - browser: safari - os: windows + os: macos with: name: Remote Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} cache-key: rb-remote-${{ matrix.browser }}-test os: ${{ matrix.os }} + java-version: 11 run: > bazel test --define browser=${{ matrix.browser }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a20e2719d5dc..137f1a7ebe256 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: with: fetch-depth: 50 - name: Setup Bazel - uses: p0deje/setup-bazel@0.2.0 + uses: p0deje/setup-bazel@0.3.2 with: bazelisk-cache: true external-cache: | diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 8d7bd8cb2d4b6..7abaecd8073c4 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -14,12 +14,12 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v4 + - uses: dessant/lock-threads@v5 with: process-only: 'issues' - issue-lock-inactive-days: '30' + issue-inactive-days: '30' issue-lock-reason: '' - issue-lock-comment: > + issue-comment: > This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c656543e13eda..53c6b734ac318 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -28,7 +28,6 @@ jobs: fail-fast: false matrix: gem: - - selenium-devtools - selenium-webdriver with: name: Release diff --git a/.github/workflows/should-workflow-run.yml b/.github/workflows/should-workflow-run.yml index ce540e5df5001..f95fd0282d8f4 100644 --- a/.github/workflows/should-workflow-run.yml +++ b/.github/workflows/should-workflow-run.yml @@ -29,7 +29,7 @@ jobs: with: fetch-depth: 50 - name: Setup Bazel - uses: p0deje/setup-bazel@0.2.0 + uses: p0deje/setup-bazel@0.3.2 with: bazelisk-cache: true external-cache: | diff --git a/.gitignore b/.gitignore index 63e5176c32523..419de8777964f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ test-output/ common/build /build/ cpp/iedriver/IEReturnTypes.h +dotnet/.idea/ +dotnet/packages/ java/client/src/org/openqa/selenium/ie/IeReturnTypes.java java/server/test/org/openqa/selenium/example javascript/deps.js @@ -97,7 +99,6 @@ ipch/ geckodriver.log ghostdriver.log .tags -.ruby-version GPATH GRTAGS GSYMS @@ -106,6 +107,7 @@ GTAGS /rb/.idea rb/bin/ rb/lib/selenium/devtools/v1* +rb/.gem_rbs_collection/ .sonar/ .idea/sonarIssues.xml .idea/inspectionProfiles/profiles_settings.xml @@ -133,3 +135,6 @@ bazel-testlogs # Engflow *.crt *.key +javascript/node/selenium-webdriver/.vscode/settings.json + +dotnet-bin diff --git a/.skipped-tests b/.skipped-tests index 6009b57437413..48a77298dbe7d 100644 --- a/.skipped-tests +++ b/.skipped-tests @@ -1,15 +1,33 @@ --//java/test/org/openqa/selenium:FormHandlingTest-chrome --//java/test/org/openqa/selenium/bidi:BiDiSessionTest-remote --//java/test/org/openqa/selenium/bidi:BiDiTest-remote +-//dotnet/test/common:DevTools/DevToolsNetworkTest-chrome +-//dotnet/test/common:Interactions/BasicMouseInterfaceTest-chrome +-//dotnet/test/common:Interactions/BasicMouseInterfaceTest-firefox +-//dotnet/test/common:JavascriptEnabledBrowserTest-chrome +-//dotnet/test/common:NetworkInterceptionTests-chrome +-//dotnet/test/common:TakesScreenshotTest-chrome +-//dotnet/test/common:TakesScreenshotTest-firefox +-//dotnet/test/common:VirtualAuthn/VirtualAuthenticatorTest-chrome +-//dotnet/test/support/UI:SelectBrowserTests-firefox +-//dotnet/test/support/UI:SelectTests +-//java/test/org/openqa/selenium/bidi/browsingcontext:BrowsingContextTest -//java/test/org/openqa/selenium/bidi/browsingcontext:BrowsingContextTest-remote --//java/test/org/openqa/selenium/bidi/log:LogInspectorTest-remote --//java/test/org/openqa/selenium/devtools:CdpFacadeTest-remote --//java/test/org/openqa/selenium/devtools:ChangeUserAgentTest-remote --//java/test/org/openqa/selenium/devtools:DevToolsReuseTest-remote --//java/test/org/openqa/selenium/devtools:JavascriptExceptionsTest-remote --//java/test/org/openqa/selenium/devtools:NetworkInterceptorRestTest-chrome-remote --//java/test/org/openqa/selenium/devtools:NetworkInterceptorTest-chrome-remote +-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest +-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-remote -//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest --//java/test/org/openqa/selenium/firefox:RemoteFirefoxDriverTest-remote +-//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest +-//java/test/org/openqa/selenium/grid/gridui:OverallGridTest +-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest +-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-chrome +-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-chrome-remote +-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest-remote +-//java/test/org/openqa/selenium/interactions:DefaultMouseTest +-//java/test/org/openqa/selenium/interactions:DefaultMouseTest-remote +-//java/test/org/openqa/selenium/remote:RemoteWebDriverBuilderTest -//java/test/org/openqa/selenium/remote:RemoteWebDriverScreenshotTest-remote --//py:auto-chrome-test/selenium/webdriver/common/virtual_authenticator_tests.py +-//javascript/atoms:test-chrome +-//javascript/atoms:test-firefox-beta +-//javascript/atoms:test-firefox-dev +-//py:common-chrome-test/selenium/webdriver/common/virtual_authenticator_tests.py +-//py:test-chrome-test/selenium/webdriver/chrome/chrome_launcher_tests.py +-//py:test-chrome-test/selenium/webdriver/chrome/chrome_service_tests.py +-//py:test-chrome-test/selenium/webdriver/chrome/proxy_tests.py +-//py:unit-test/unit/selenium/webdriver/common/cdp_module_fallback_tests.py diff --git a/README.md b/README.md index 22bda93ebea27..fd4c1f83b970b 100644 --- a/README.md +++ b/README.md @@ -260,9 +260,10 @@ Supported environment variables: - `EDGE_BINARY` - path to test specific Edge browser - `FIREFOX_BINARY` - path to test specific Firefox browser -To run with a specific version of Ruby you can change the version in `rb/ruby_version.bzl` or from command line: +To run with a specific version of Ruby you can change the version in `rb/.ruby-version` or from command line: + ```sh -echo 'RUBY_VERSION = ""' > rb/ruby_version.bzl +echo '' > rb/.ruby-version ``` If you want to debug code in tests, you can do it via [`debug`](https://github.com/ruby/debug) gem: diff --git a/Rakefile b/Rakefile index 6a26ae038720a..89c76f3c2e62e 100644 --- a/Rakefile +++ b/Rakefile @@ -50,12 +50,10 @@ $DEBUG = true if ENV['debug'] == 'true' verbose($DEBUG) -def release_version - '4.13' -end - -def version - "#{release_version}.0" +def java_version + File.foreach('java/version.bzl') do |line| + return line.split('=').last.strip.tr('"', '') if line.include?('SE_VERSION') + end end # The build system used by webdriver is layered on top of rake, and we call it @@ -98,9 +96,9 @@ task '//java/test/org/openqa/selenium/environment/webserver:webserver:uber' => [ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium/chrome:chrome.publish //java/src/org/openqa/selenium/chromium:chromium.publish - //java/src/org/openqa/selenium/devtools/v115:v115.publish - //java/src/org/openqa/selenium/devtools/v116:v116.publish - //java/src/org/openqa/selenium/devtools/v117:v117.publish + //java/src/org/openqa/selenium/devtools/v119:v119.publish + //java/src/org/openqa/selenium/devtools/v120:v120.publish + //java/src/org/openqa/selenium/devtools/v118:v118.publish //java/src/org/openqa/selenium/devtools/v85:v85.publish //java/src/org/openqa/selenium/edge:edge.publish //java/src/org/openqa/selenium/firefox:firefox.publish @@ -111,10 +109,8 @@ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium/grid:grid.publish //java/src/org/openqa/selenium/ie:ie.publish //java/src/org/openqa/selenium/json:json.publish - //java/src/org/openqa/selenium/lift:lift.publish //java/src/org/openqa/selenium/manager:manager.publish //java/src/org/openqa/selenium/os:os.publish - //java/src/org/openqa/selenium/remote/http/jdk:jdk.publish //java/src/org/openqa/selenium/remote/http:http.publish //java/src/org/openqa/selenium/remote:remote.publish //java/src/org/openqa/selenium/safari:safari.publish @@ -154,7 +150,6 @@ task remote_server: ['//java/src/org/openqa/selenium/remote/server'] task safari: ['//java/src/org/openqa/selenium/safari'] task selenium: ['//java/src/org/openqa/selenium:core'] task support: [ - '//java/src/org/openqa/selenium/lift', '//java/src/org/openqa/selenium/support' ] @@ -203,7 +198,6 @@ task test_remote: [ ] task test_safari: ['//java/test/org/openqa/selenium/safari:safari:run'] task test_support: [ - '//java/test/org/openqa/selenium/lift:lift:run', '//java/test/org/openqa/selenium/support:small-tests:run', '//java/test/org/openqa/selenium/support:large-tests:run' ] @@ -336,21 +330,21 @@ task 'prep-release-zip': [ '//java/src/org/openqa/selenium/grid:executable-grid', ] do [ - "build/dist/selenium-server-#{version}.zip", - "build/dist/selenium-java-#{version}.zip", - "build/dist/selenium-server-#{version}.jar" + "build/dist/selenium-server-#{java-version}.zip", + "build/dist/selenium-java-#{java-version}.zip", + "build/dist/selenium-server-#{java-version}.jar" ].each do |f| rm_f(f) if File.exists?(f) end mkdir_p 'build/dist' File.delete - cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip", "build/dist/selenium-server-#{version}.zip", preserve: false - chmod 0666, "build/dist/selenium-server-#{version}.zip" - cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip", "build/dist/selenium-java-#{version}.zip", preserve: false - chmod 0666, "build/dist/selenium-java-#{version}.zip" - cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium", "build/dist/selenium-server-#{version}.jar", preserve: false - chmod 0666, "build/dist/selenium-server-#{version}.jar" + cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip", "build/dist/selenium-server-#{java-version}.zip", preserve: false + chmod 0666, "build/dist/selenium-server-#{java-version}.zip" + cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip", "build/dist/selenium-java-#{java-version}.zip", preserve: false + chmod 0666, "build/dist/selenium-java-#{java-version}.zip" + cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium", "build/dist/selenium-server-#{java-version}.jar", preserve: false + chmod 0777, "build/dist/selenium-server-#{java-version}.jar" end task 'release-java': %i[prep-release-zip publish-maven] @@ -391,7 +385,7 @@ end task 'publish-maven-snapshot': JAVA_RELEASE_TARGETS do creds = read_m2_user_pass - if version.end_with?('-SNAPSHOT') + if java-version.end_with?('-SNAPSHOT') JAVA_RELEASE_TARGETS.each do |p| Bazel::execute('run', ['--stamp', '--define', 'maven_repo=https://oss.sonatype.org/content/repositories/snapshots', '--define', "maven_user=#{creds[0]}", '--define', "maven_password=#{creds[1]}", '--define', 'gpg_sign=false'], p) end diff --git a/WORKSPACE b/WORKSPACE index 40f16067d43c4..6832bce4ddf07 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -62,10 +62,10 @@ python_register_multi_toolchains( ) load("@python//:pip.bzl", "multi_pip_parse") -load("@python//3.11:defs.bzl", interpreter_3_11 = "interpreter") load("@python//3.10:defs.bzl", interpreter_3_10 = "interpreter") -load("@python//3.9:defs.bzl", interpreter_3_9 = "interpreter") +load("@python//3.11:defs.bzl", interpreter_3_11 = "interpreter") load("@python//3.8:defs.bzl", interpreter_3_8 = "interpreter") +load("@python//3.9:defs.bzl", interpreter_3_9 = "interpreter") multi_pip_parse( name = "py_dev_requirements", @@ -144,9 +144,9 @@ rules_jvm_external_setup() http_archive( name = "contrib_rules_jvm", - sha256 = "548f0583192ff79c317789b03b882a7be9b1325eb5d3da5d7fdcc4b7ca69d543", - strip_prefix = "rules_jvm-0.9.0", - url = "https://github.com/bazel-contrib/rules_jvm/archive/refs/tags/v0.9.0.tar.gz", + sha256 = "4d62589dc6a55e74bbe33930b826d593367fc777449a410604b2ad7c6c625ef7", + strip_prefix = "rules_jvm-0.19.0", + url = "https://github.com/bazel-contrib/rules_jvm/releases/download/v0.19.0/rules_jvm-v0.19.0.tar.gz", ) load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps") @@ -166,17 +166,33 @@ load("@maven//:defs.bzl", "pinned_maven_install") pinned_maven_install() http_archive( - name = "d2l_rules_csharp", - sha256 = "c0152befb1fd0e08527b38e41ef00b6627f9f0c2be6f2d23a4950f41701fa48a", - strip_prefix = "rules_csharp-50e2f6c79e7a53e50b4518239b5ebcc61279759e", - urls = [ - "https://github.com/Brightspace/rules_csharp/archive/50e2f6c79e7a53e50b4518239b5ebcc61279759e.tar.gz", - ], + name = "rules_dotnet", + sha256 = "718cb2c3431523aaf3df7feed0e997e4ded002abbf56ac37d9c0536a812d6276", + strip_prefix = "rules_dotnet-0.12.0", + url = "https://github.com/bazelbuild/rules_dotnet/releases/download/v0.12.0/rules_dotnet-v0.12.0.tar.gz", ) -load("//dotnet:workspace.bzl", "selenium_register_dotnet") +load( + "@rules_dotnet//dotnet:repositories.bzl", + "dotnet_register_toolchains", + "rules_dotnet_dependencies", +) + +rules_dotnet_dependencies() + +dotnet_register_toolchains("dotnet", "7.0.400") + +load("@rules_dotnet//dotnet:rules_dotnet_nuget_packages.bzl", "rules_dotnet_nuget_packages") + +rules_dotnet_nuget_packages() + +load("@rules_dotnet//dotnet:paket2bazel_dependencies.bzl", "paket2bazel_dependencies") + +paket2bazel_dependencies() + +load("//dotnet:paket.bzl", "paket") -selenium_register_dotnet() +paket() http_archive( name = "rules_rust", @@ -311,19 +327,18 @@ pin_browsers() http_archive( name = "rules_ruby", - sha256 = "34296f8cad46ec10b7eea59f3399feabcfbc33935b7d8bec880ea0ecfadc23b5", - strip_prefix = "rules_ruby-9550503e1c1702375e87837d43eb137030edd28a", - url = "https://github.com/p0deje/rules_ruby/archive/9550503e1c1702375e87837d43eb137030edd28a.zip", + sha256 = "e3495d0129222572654cc5dd5c72c6c997513d65fb8649f43a860ab15334a1c2", + strip_prefix = "rules_ruby-0.4.1", + url = "https://github.com/bazel-contrib/rules_ruby/releases/download/v0.4.1/rules_ruby-v0.4.1.tar.gz", ) -load("//rb:ruby_version.bzl", "RUBY_VERSION") load( "@rules_ruby//ruby:deps.bzl", "rb_bundle", "rb_register_toolchains", ) -rb_register_toolchains(version = RUBY_VERSION) +rb_register_toolchains(version_file = "//:rb/.ruby-version") rb_bundle( name = "bundle", diff --git a/common/devtools/chromium/v115/BUILD.bazel b/common/devtools/chromium/v118/BUILD.bazel similarity index 100% rename from common/devtools/chromium/v115/BUILD.bazel rename to common/devtools/chromium/v118/BUILD.bazel diff --git a/common/devtools/chromium/v117/browser_protocol.pdl b/common/devtools/chromium/v118/browser_protocol.pdl similarity index 99% rename from common/devtools/chromium/v117/browser_protocol.pdl rename to common/devtools/chromium/v118/browser_protocol.pdl index a2d52be0a8702..f19168c9ea39f 100644 --- a/common/devtools/chromium/v117/browser_protocol.pdl +++ b/common/devtools/chromium/v118/browser_protocol.pdl @@ -1002,14 +1002,61 @@ experimental domain Autofill properties # address field name, for example GIVEN_NAME. string name - # address field name, for example Jon Doe. + # address field value, for example Jon Doe. string value + # A list of address fields. + type AddressFields extends object + properties + array of AddressField fields + type Address extends object properties - # fields and values defining a test address. + # fields and values defining an address. array of AddressField fields + # Defines how an address can be displayed like in chrome://settings/addresses. + # Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such. + # The following address UI for instance: + # [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] + # should allow the receiver to render: + # Jon Doe + # Munich 81456 + type AddressUI extends object + properties + # A two dimension array containing the repesentation of values from an address profile. + array of AddressFields addressFields + + # Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics. + type FillingStrategy extends string + enum + autocompleteAttribute + autofillInferred + + type FilledField extends object + properties + # The type of the field, e.g text, password etc. + string htmlType + # the html id + string id + # the html name + string name + # the field value + string value + # The actual field type, e.g FAMILY_NAME + string autofillType + # The filling strategy + FillingStrategy fillingStrategy + + # Emitted when an address form is filled. + event addressFormFilled + parameters + # Information about the fields that were filled + array of FilledField filledFields + # An UI representation of the address used to fill the form. + # Consists of a 2D array where each child represents an address/profile line. + AddressUI addressUi + # Trigger autofill on a form identified by the fieldId. # If the field and related form cannot be autofilled, returns an error. command trigger @@ -1027,6 +1074,11 @@ experimental domain Autofill parameters array of Address addresses + # Disables autofill domain notifications. + command disable + + # Enables autofill domain notifications. + command enable # Defines events for background web platform features. experimental domain BackgroundService @@ -1830,6 +1882,28 @@ experimental domain CSS # List of keyframes. array of CSSKeyframeRule keyframes + # Representation of a custom property registration through CSS.registerProperty + type CSSPropertyRegistration extends object + properties + string propertyName + optional Value initialValue + boolean inherits + string syntax + + + # CSS property at-rule representation. + type CSSPropertyRule extends object + properties + # The css style sheet identifier (absent for user agent stylesheet and user-specified + # stylesheet rules) this rule came from. + optional StyleSheetId styleSheetId + # Parent stylesheet's origin. + StyleSheetOrigin origin + # Associated property name. + Value propertyName + # Associated style declaration. + CSSStyle style + # CSS keyframe rule representation. type CSSKeyframeRule extends object properties @@ -1957,6 +2031,10 @@ experimental domain CSS optional array of CSSKeyframesRule cssKeyframesRules # A list of CSS position fallbacks matching this node. optional array of CSSPositionFallbackRule cssPositionFallbackRules + # A list of CSS at-property rules matching this node. + optional array of CSSPropertyRule cssPropertyRules + # A list of CSS property registrations matching this node. + optional array of CSSPropertyRegistration cssPropertyRegistrations # Id of the first parent element that does not have display: contents. experimental optional DOM.NodeId parentLayoutNodeId @@ -7352,6 +7430,7 @@ domain Page ch-ect ch-prefers-color-scheme ch-prefers-reduced-motion + ch-prefers-reduced-transparency ch-rtt ch-save-data ch-ua @@ -9691,13 +9770,22 @@ experimental domain Storage string key UnsignedInt128AsBase16 value + experimental type AttributionReportingEventReportWindows extends object + properties + # duration in seconds + integer start + # duration in seconds + array of integer ends + experimental type AttributionReportingSourceRegistration extends object properties Network.TimeSinceEpoch time # duration in seconds optional integer expiry + # eventReportWindow and eventReportWindows are mutually exclusive # duration in seconds optional integer eventReportWindow + optional AttributionReportingEventReportWindows eventReportWindows # duration in seconds optional integer aggregatableReportWindow AttributionReportingSourceType type @@ -11372,6 +11460,7 @@ experimental domain FedCm enum AccountChooser AutoReauthn + ConfirmIdpSignin # Corresponds to IdentityRequestAccount type Account extends object @@ -11412,6 +11501,12 @@ experimental domain FedCm string dialogId integer accountIndex + # Only valid if the dialog type is ConfirmIdpSignin. Acts as if the user had + # clicked the continue button. + command confirmIdpSignin + parameters + string dialogId + command dismissDialog parameters string dialogId diff --git a/common/devtools/chromium/v117/js_protocol.pdl b/common/devtools/chromium/v118/js_protocol.pdl similarity index 100% rename from common/devtools/chromium/v117/js_protocol.pdl rename to common/devtools/chromium/v118/js_protocol.pdl diff --git a/common/devtools/chromium/v116/BUILD.bazel b/common/devtools/chromium/v119/BUILD.bazel similarity index 100% rename from common/devtools/chromium/v116/BUILD.bazel rename to common/devtools/chromium/v119/BUILD.bazel diff --git a/common/devtools/chromium/v116/browser_protocol.pdl b/common/devtools/chromium/v119/browser_protocol.pdl similarity index 97% rename from common/devtools/chromium/v116/browser_protocol.pdl rename to common/devtools/chromium/v119/browser_protocol.pdl index 46ab2a53eec4d..1360239087bb5 100644 --- a/common/devtools/chromium/v116/browser_protocol.pdl +++ b/common/devtools/chromium/v119/browser_protocol.pdl @@ -72,7 +72,7 @@ experimental domain Accessibility optional AXValue attributeValue # Whether this source is superseded by a higher priority source. optional boolean superseded - # The native markup source for this value, e.g. a