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..7e3cbf4e89025 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 diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 848bb09da1399..f569f3e10a7da 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -12,7 +12,9 @@ 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 + bazel build //dotnet/src/support integration-tests: name: Browser Tests diff --git a/.github/workflows/ci-java.yml b/.github/workflows/ci-java.yml index ce3f6955d10e3..ec03c0f84e7d9 100644 --- a/.github/workflows/ci-java.yml +++ b/.github/workflows/ci-java.yml @@ -22,79 +22,38 @@ jobs: 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 + needs: build 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 + needs: build 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-python.yml b/.github/workflows/ci-python.yml index 5d09c6d971136..a241bce091c4c 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -77,18 +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 + needs: build uses: ./.github/workflows/bazel.yml strategy: fail-fast: false @@ -104,7 +95,7 @@ jobs: 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..1cb18abd09071 100644 --- a/.github/workflows/ci-ruby.yml +++ b/.github/workflows/ci-ruby.yml @@ -47,7 +47,7 @@ jobs: os: ubuntu - ruby-version: 3.2.0 os: macos - - ruby-version: jruby-9.4.0.0 + - ruby-version: jruby-9.4.3.0 os: ubuntu - ruby-version: truffleruby-22.3.0 os: ubuntu @@ -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/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/.gitignore b/.gitignore index 63e5176c32523..2e1040729da15 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 diff --git a/.skipped-tests b/.skipped-tests index 6009b57437413..25e52bd24cb62 100644 --- a/.skipped-tests +++ b/.skipped-tests @@ -1,8 +1,20 @@ --//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/bidi:BiDiSessionTest-remote +-//java/test/org/openqa/selenium/bidi:BiDiTest-remote +-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest +-//java/test/org/openqa/selenium/chrome:ChromeDriverFunctionalTest-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 @@ -10,6 +22,18 @@ -//java/test/org/openqa/selenium/devtools:NetworkInterceptorRestTest-chrome-remote -//java/test/org/openqa/selenium/devtools:NetworkInterceptorTest-chrome-remote -//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest +-//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest -//java/test/org/openqa/selenium/firefox:RemoteFirefoxDriverTest-remote +-//java/test/org/openqa/selenium/grid/gridui:OverallGridTest +-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverBiDiTest +-//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 +-//java/test/org/openqa/selenium:FormHandlingTest-chrome -//py:auto-chrome-test/selenium/webdriver/common/virtual_authenticator_tests.py +-//py:unit-test/unit/selenium/webdriver/common/cdp_module_fallback_tests.py diff --git a/Rakefile b/Rakefile index 6a26ae038720a..1c659c50046f8 100644 --- a/Rakefile +++ b/Rakefile @@ -51,7 +51,7 @@ $DEBUG = true if ENV['debug'] == 'true' verbose($DEBUG) def release_version - '4.13' + '4.14' end def version @@ -98,9 +98,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/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 diff --git a/WORKSPACE b/WORKSPACE index 40f16067d43c4..47c3bc2f5ed78 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,41 @@ 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", + patch_args = ["-p1"], + patches = [ + "//dotnet:0001-Include-more-of-the-SDK.patch", + "//dotnet:0002-Pass-through-information-about-location-of-the-nupkg.patch", + "//dotnet:0003-Make-Runfiles-library-compatible-with-net-standard-2-0.patch", + "//dotnet:0004-Ensure-data-runfiles-are-added-to-tests.patch", + "//dotnet:0005-Ensure-csharp_library-files-are-unique.patch", ], + sha256 = "f445400dac566eed9d7895aa0fb168a5453a07e5128dc1c4852cd9c537e0ca60", + strip_prefix = "rules_dotnet-0.10.7", + url = "https://github.com/bazelbuild/rules_dotnet/releases/download/v0.10.7/rules_dotnet-v0.10.7.tar.gz", +) + +load( + "@rules_dotnet//dotnet:repositories.bzl", + "dotnet_register_toolchains", + "rules_dotnet_dependencies", ) -load("//dotnet:workspace.bzl", "selenium_register_dotnet") +rules_dotnet_dependencies() -selenium_register_dotnet() +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") + +paket() http_archive( name = "rules_rust", @@ -316,12 +340,12 @@ http_archive( url = "https://github.com/p0deje/rules_ruby/archive/9550503e1c1702375e87837d43eb137030edd28a.zip", ) -load("//rb:ruby_version.bzl", "RUBY_VERSION") load( "@rules_ruby//ruby:deps.bzl", "rb_bundle", "rb_register_toolchains", ) +load("//rb:ruby_version.bzl", "RUBY_VERSION") rb_register_toolchains(version = RUBY_VERSION) 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/v115/browser_protocol.pdl b/common/devtools/chromium/v118/browser_protocol.pdl similarity index 96% rename from common/devtools/chromium/v115/browser_protocol.pdl rename to common/devtools/chromium/v118/browser_protocol.pdl index 81acd27979826..f19168c9ea39f 100644 --- a/common/devtools/chromium/v115/browser_protocol.pdl +++ b/common/devtools/chromium/v118/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