diff --git a/.bazelrc b/.bazelrc index a9bb83374335e..88c00c5581bbd 100644 --- a/.bazelrc +++ b/.bazelrc @@ -105,6 +105,7 @@ test --test_env=JRUBY_OPTS="--dev" test:windows --test_env=PATH test:windows --test_env=LOCALAPPDATA +test:windows --test_env=PROCESSOR_ARCHITECTURE test:windows --test_env=PROGRAMFILES="C:\\Program Files" test:windows --test_env=PROGRAMFILES(X86)="C:\\Program Files (x86)" diff --git a/.bazelrc.remote b/.bazelrc.remote index db858bbfaf1f5..10bc7e49ded5b 100644 --- a/.bazelrc.remote +++ b/.bazelrc.remote @@ -31,7 +31,7 @@ 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=-skip-remote,-remote +test:remote --test_tag_filters=-exclusive-if-local,-skip-remote,-remote # Env vars we can hard code build:remote --action_env=HOME=/home/dev diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 5d479429e25fe..3f4a9f0c957a6 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -132,7 +132,7 @@ jobs: name: ${{ inputs.cache-key }} manifest: crates: rust/Cargo.Bazel.lock - rules_ruby~~ruby~ruby: ${{ inputs.os == 'windows' && 'false' || 'rb/.ruby-version' }} + rules_ruby++ruby+ruby: ${{ inputs.os == 'windows' && 'false' || 'rb/.ruby-version' }} repository-cache: true - name: Setup Bazel without caching if: inputs.caching == false diff --git a/.github/workflows/ci-ruby.yml b/.github/workflows/ci-ruby.yml index d091179110b55..d11ffab8c7d6f 100644 --- a/.github/workflows/ci-ruby.yml +++ b/.github/workflows/ci-ruby.yml @@ -53,7 +53,7 @@ jobs: os: ubuntu with: name: Unit Tests (${{ matrix.ruby-version }}, ${{ matrix.os }}) - cache-key: rb-unit-test-${{ matrix.ruby-version }} + cache-key: rb-unit-test-${{ matrix.ruby-version }}-${{ matrix.os }} os: ${{ matrix.os }} ruby-version: ${{ matrix.ruby-version }} run: > @@ -83,7 +83,7 @@ jobs: with: name: Local Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} - cache-key: rb-${{ matrix.browser }}-test + cache-key: rb-${{ matrix.browser }}-${{ matrix.os }}-test os: ${{ matrix.os }} run: > bazel test @@ -109,9 +109,9 @@ jobs: with: name: Remote Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} - cache-key: rb-remote-${{ matrix.browser }}-test + cache-key: rb-remote-${{ matrix.browser }}-${{ matrix.os }}-test os: ${{ matrix.os }} - java-version: 11 + java-version: 17 run: > bazel test --keep_going diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 2489938bda71f..240b218f42c29 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -97,7 +97,6 @@ jobs: **Warning: Manually update the changelogs before merging** This PR: - * Updates Rust version for Selenium Manager release * Updates Pinned browser version to coincide with new CDP release * Adds support for new CDP version and removes old CDP version * Selenium Manager references the new Selenium Manager release @@ -105,9 +104,12 @@ jobs: * Adds new authors to authors file * Updates all versions for all bindings * Generates *rough* change logs for each bindings (please tidy them up before merging this) + * Not all commits need to be in the change log — users do not need to see anything about building or testing Selenium + * Remove references to updating versions including nightly + * The code now outputs the complete body of the commit message; make sure the changelog message is complete and correct - - Auto-generated by [create-pull-request][1] + - This PR was auto-generated by workflow run: [release-preparation][1] - [1]: https://github.com/peter-evans/create-pull-request + [1]: https://github.com/SeleniumHQ/selenium/actions/runs/${{ github.run_id }} labels: C-build draft: true diff --git a/.mailmap b/.mailmap index 92e57a7c9fb60..dc98f4b60f5be 100644 --- a/.mailmap +++ b/.mailmap @@ -16,6 +16,7 @@ Brandon Walderman Brian Burg Chethana Paniyadi Craig Nishina +Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Dan Fabulich Daniel P. Purkhús diff --git a/AUTHORS b/AUTHORS index 5a2658d8edb1c..ae218b4f66395 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ abidema <44252090+abidema@users.noreply.github.com> Adam Dangoor Adam Demuri Adam Goucher +Adam Halbrock Adam Smith AdamPDotty <81536237+AdamPDotty@users.noreply.github.com> Adi Roiban @@ -282,6 +283,7 @@ EwaMarek Fan <1135611487@qq.com> Felipe Knorr Kuhn Fenil Mehta <42742240+fenilgmehta@users.noreply.github.com> +FloKNetcare Florian Apolloner Florian LOPES Florian Mutter <32459530+florianmutter@users.noreply.github.com> @@ -454,6 +456,7 @@ John J. Barton John Pelly Johnny.H Johnson <20457146+j3soon@users.noreply.github.com> +Jolyon Pawlyn joma74 Jon Dufresne Jon Spalding @@ -685,6 +688,7 @@ orangeudav Oscar Devora <100381276+RevealOscar@users.noreply.github.com> Outsider Paladin Wang <49390614+eversoutheast@users.noreply.github.com> +Pallavi Palmer Bandy <37938675+palmermbandy@users.noreply.github.com> Pat Tullmann Patrice Jaton @@ -744,6 +748,7 @@ Robert Fletcher Roberto Rivera Robin Stocker Rod McNew +Romain Tartière Roman Yurchak Roman Yurchak Roman Zoller diff --git a/MODULE.bazel b/MODULE.bazel index 2bf4e81486034..e8ed84e55c46a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -172,62 +172,62 @@ maven.install( artifacts = [ "com.beust:jcommander:1.82", "com.github.javaparser:javaparser-core:3.26.3", - "com.github.spotbugs:spotbugs:4.9.1", + "com.github.spotbugs:spotbugs:4.9.3", "com.github.stephenc.jcip:jcip-annotations:1.0-1", + "com.google.code.findbugs:jsr305:3.0.2", "com.google.code.gson:gson:2.12.1", - "com.google.guava:guava:33.4.0-jre", + "com.google.guava:guava:33.4.5-jre", "com.google.auto:auto-common:1.2.2", "com.google.auto.service:auto-service:1.1.1", "com.google.auto.service:auto-service-annotations:1.1.1", - "com.google.googlejavaformat:google-java-format:jar:1.25.2", + "com.google.googlejavaformat:google-java-format:1.25.2", "com.graphql-java:graphql-java:22.3", "dev.failsafe:failsafe:3.3.2", - "io.grpc:grpc-context:1.70.0", - "io.lettuce:lettuce-core:6.5.3.RELEASE", - "io.netty:netty-buffer", - "io.netty:netty-codec-http", - "io.netty:netty-codec-http2", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-handler-proxy", - "io.netty:netty-transport", - "io.opentelemetry:opentelemetry-api", - "io.opentelemetry:opentelemetry-context", - "io.opentelemetry:opentelemetry-exporter-logging", - "io.opentelemetry:opentelemetry-sdk", - "io.opentelemetry:opentelemetry-sdk-common", - "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure", - "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi", - "io.opentelemetry:opentelemetry-sdk-testing", - "io.opentelemetry:opentelemetry-sdk-trace", - "io.opentelemetry.semconv:opentelemetry-semconv:1.28.0-alpha", + "io.grpc:grpc-context:1.71.0", + "io.lettuce:lettuce-core:6.5.5.RELEASE", + "io.netty:netty-buffer:4.1.119.Final", + "io.netty:netty-codec-http:4.1.119.Final", + "io.netty:netty-codec-http2:4.1.119.Final", + "io.netty:netty-common:4.1.119.Final", + "io.netty:netty-handler:4.1.119.Final", + "io.netty:netty-handler-proxy:4.1.119.Final", + "io.netty:netty-transport:4.1.119.Final", + "io.opentelemetry:opentelemetry-api:1.48.0", + "io.opentelemetry:opentelemetry-context:1.48.0", + "io.opentelemetry:opentelemetry-exporter-logging:1.48.0", + "io.opentelemetry:opentelemetry-sdk:1.48.0", + "io.opentelemetry:opentelemetry-sdk-common:1.48.0", + "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.48.0", + "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.48.0", + "io.opentelemetry:opentelemetry-sdk-testing:1.48.0", + "io.opentelemetry:opentelemetry-sdk-trace:1.48.0", "it.ozimov:embedded-redis:0.7.3", - "net.bytebuddy:byte-buddy:1.15.11", - "org.htmlunit:htmlunit-core-js:4.7.0", + "net.bytebuddy:byte-buddy:1.17.2", + "org.htmlunit:htmlunit-core-js:4.10.0", "org.apache.commons:commons-exec:1.4.0", "org.apache.logging.log4j:log4j-core:2.24.3", - "org.assertj:assertj-core:3.27.2", - "org.bouncycastle:bcpkix-jdk18on:1.79", + "org.assertj:assertj-core:3.27.3", + "org.bouncycastle:bcpkix-jdk18on:1.80", "org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5", "org.hsqldb:hsqldb:2.7.4", "org.jspecify:jspecify:1.0.0", - "org.junit.jupiter:junit-jupiter-api", - "org.junit.jupiter:junit-jupiter-engine", - "org.junit.jupiter:junit-jupiter-params", - "org.junit.platform:junit-platform-launcher", - "org.junit.platform:junit-platform-reporting", - "org.junit.platform:junit-platform-commons", - "org.junit.platform:junit-platform-engine", - "org.mockito:mockito-core:5.15.2", - "org.redisson:redisson:3.41.0", - "org.slf4j:slf4j-api:2.0.16", - "org.slf4j:slf4j-jdk14:2.0.16", + "org.junit.jupiter:junit-jupiter-api:5.12.1", + "org.junit.jupiter:junit-jupiter-engine:5.12.1", + "org.junit.jupiter:junit-jupiter-params:5.12.1", + "org.junit.platform:junit-platform-launcher:1.12.1", + "org.junit.platform:junit-platform-reporting:1.12.1", + "org.junit.platform:junit-platform-commons:1.12.1", + "org.junit.platform:junit-platform-engine:1.12.1", + "org.mockito:mockito-core:5.16.1", + "org.redisson:redisson:3.45.1", + "org.slf4j:slf4j-api:2.0.17", + "org.slf4j:slf4j-jdk14:2.0.17", "org.tomlj:tomlj:1.1.1", "org.zeromq:jeromq:0.6.0", ], boms = [ "io.opentelemetry:opentelemetry-bom:1.46.0", - "io.netty:netty-bom:4.1.117.Final", + "io.netty:netty-bom:4.1.118.Final", "org.junit:junit-bom:5.11.4", ], excluded_artifacts = [ @@ -276,7 +276,7 @@ ruby.bundle_fetch( "connection_pool-2.5.0": "233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc", "crack-1.0.0": "c83aefdb428cdc7b66c7f287e488c796f055c0839e6e545fec2c7047743c4a49", "csv-3.3.2": "6ff0c135e65e485d1864dde6c1703b60d34cc9e19bed8452834a0b28a519bd4e", - "curb-1.0.8": "e23ab9225fb2fc02c083e0588d5b918b5533f0d01cdd0aa70414829ba9e92962", + "curb-1.0.9": "07e5b74a4836103ce186827528f76a22d3991a9b7c45f5c10ee18ee7b03feb0d", "date-3.4.1": "bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f", "date-3.4.1-java": "74740d914c65a922a15657c25ff0e203c16f1d0f7aa910a9ebed712afe9819c4", "debug-1.10.0": "11e28ca74875979e612444104f3972bd5ffb9e79179907d7ad46dba44bd2e7a4", @@ -299,6 +299,7 @@ ruby.bundle_fetch( "json-2.10.1": "ddc88ad91a1baf3f0038c174f253af3b086d30dc74db17ca4259bbde982f94dc", "json-2.10.1-java": "de07233fb74113af2186eb9342f8207c9be0faf289a1e2623c9b0acb8b0b0ee1", "language_server-protocol-3.17.0.4": "c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669", + "lint_roller-1.1.0": "2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87", "listen-3.9.0": "db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67", "logger-1.6.6": "dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017", "minitest-5.25.4": "9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947", @@ -321,17 +322,17 @@ ruby.bundle_fetch( "rdoc-6.12.0": "7d6f706e070bffa5d18a448f24076cbfb34923a99c1eab842aa18e6ca69f56e0", "regexp_parser-2.10.0": "cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61", "reline-0.6.0": "57620375dcbe56ec09bac7192bfb7460c716bbf0054dc94345ecaa5438e539d2", - "rexml-3.4.0": "efbea1efba7fa151158e0ee1e643525834da2d8eb4cf744aa68f6480bc9804b2", + "rexml-3.4.1": "c74527a9a0a04b4ec31dbe0dc4ed6004b960af943d8db42e539edde3a871abca", "rspec-3.13.0": "d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993", "rspec-core-3.13.3": "25136507f4f9cf2e8977a2851e64e438b4331646054e345998714108745cdfe4", "rspec-expectations-3.13.3": "0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58", "rspec-mocks-3.13.2": "2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef", "rspec-support-3.13.2": "cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec", - "rubocop-1.71.2": "9a7b7501aac661a338ed7ff2a5eba78e581759e1f0d3c82362b2ca217ed3f97f", + "rubocop-1.72.2": "0259a32d89fee60882bf4c4d8847e696357719c9db4971839da742bf053ae96b", "rubocop-ast-1.38.0": "4fdf6792fe443a9a18acb12dbc8225d0d64cd1654e41fedb30e79c18edbb26ae", "rubocop-capybara-2.21.0": "5d264efdd8b6c7081a3d4889decf1451a1cfaaec204d81534e236bc825b280ab", "rubocop-factory_bot-2.26.1": "8de13cd4edcee5ca800f255188167ecef8dbfc3d1fae9f15734e9d2e755392aa", - "rubocop-performance-1.23.1": "f22f86a795f5e6a6180aac2c6fc172534b173a068d6ed3396d6460523e051b82", + "rubocop-performance-1.24.0": "e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5", "rubocop-rake-0.6.0": "56b6f22189af4b33d4f4e490a555c09f1281b02f4d48c3a61f6e8fe5f401d8db", "rubocop-rspec-2.31.0": "2bae19388d78e1ceace44cd95fd34f3209f4ef20cac1b168d0a1325cbba3d672", "rubocop-rspec_rails-2.29.1": "4ae95abbe9ca5a9b6d8be14e50d230fb5b6ba033b05d4c0981b5b76fc44988e4", @@ -339,7 +340,7 @@ ruby.bundle_fetch( "rubyzip-2.4.1": "8577c88edc1fde8935eb91064c5cb1aef9ad5494b940cf19c775ee833e075615", "securerandom-0.4.1": "cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1", "steep-1.5.3": "7c6302a4d5932d0a46176ebc79766e52b853c223a85525aa2f8911e345123b85", - "stringio-3.1.2": "204f1828f85cdb39d57cac4abc6dc44b04505a223f131587f2e20ae3729ba131", + "stringio-3.1.4": "7dd68f6f1a88610817c21f6d926dbf36e1fc585d3869fcd4a56c1f3210591d70", "strscan-3.1.2": "5529ff36c95fe752b8489f2e6c7f4f230fd9904e0b24fdc6e0833436c63ee2e3", "strscan-3.1.2-java": "4e9379df974b1af28d1bc1bc845ebb7e2bb21a7f9948ac99e1a8c5479881ecec", "terminal-table-3.0.2": "f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91", diff --git a/README.md b/README.md index 5ba50ed90968d..9a091b30b290a 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ for Maven to use locally by deploying to your local maven repository (`~/.m2/rep #### Updating Dependencies -Dependencies are defined in the file [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl). +Dependencies are defined in the file [MODULE.bazel](https://github.com/SeleniumHQ/selenium/blob/trunk/MODULE.bazel). To automatically update and pin new dependencies, run: ```shell @@ -210,16 +210,47 @@ To automatically update and pin new dependencies, run: ### Python -You can run Python code locally by updating generated files in the python directory using: +#### Linting + +We follow the [PEP8 Style Guide for Python Code](https://peps.python.org/pep-0008) (except we use a 120 character line length). +This is checked and enforced with several linting tools, including +[black](https://pypi.org/project/black), +[docformatter](https://pypi.org/project/docformatter), +[flake8](https://flake8.pycqa.org), +and [isort](https://pycqa.github.io/isort). + +To run all of the linting tools: +```shell +./go py:lint +``` + +You need `tox` installed to run the linting tools (`pip install tox`). + +#### Local Installation + +To run Python code locally without building/installing the package, you must first install the dependencies: +```shell +pip install -r py/requirements.txt +``` + +Then, build the generated files and copy them into your local source tree: ```shell -./go py:update +./go py:local_dev ``` -To install Selenium locally based on a specific commit, you can use: +After that, you can import the selenium package directly from source from the `py` directory. + +Instead of running from source, you can build and install the selenium package (wheel) locally: ```shell ./go py:install ``` +This will attempt to install into the global Python `site-packages` directory, +which might not be writable. To avoid this, you should create and activate a +[virtual environment](https://packaging.python.org/en/latest/tutorials/installing-packages/#creating-virtual-environments) +before installing. + + ### Ruby Instead of using `irb`, you can create an interactive REPL with all gems loaded using: `bazel run //rb:console` @@ -283,6 +314,9 @@ Tests can also be filtered by tag like: bazel test ///... --test_tag_filters=this,-not-this ``` +If there are multiple `--test_tag_filters`, only the last one is considered, +so be careful if also using an inherited config + ### Java
diff --git a/Rakefile b/Rakefile index 38dec3fbe5f1a..a58182c24d465 100644 --- a/Rakefile +++ b/Rakefile @@ -92,15 +92,13 @@ task '//java/test/org/openqa/selenium/environment/webserver:webserver:uber' => [ '//java/test/org/openqa/selenium/environment:webserver' ] -# Java targets required for release. These should all be java_export targets. -# Generated from: bazel query 'kind(maven_publish, set(//java/... //third_party/...))' | sort +# use #java_release_targets to access this list 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/v131:v131.publish + //java/src/org/openqa/selenium/devtools/v134:v134.publish //java/src/org/openqa/selenium/devtools/v132:v132.publish //java/src/org/openqa/selenium/devtools/v133:v133.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 //java/src/org/openqa/selenium/grid/sessionmap/jdbc:jdbc.publish @@ -120,6 +118,34 @@ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium:core.publish ].freeze +def java_release_targets + @targets_verified ||= verify_java_release_targets + + JAVA_RELEASE_TARGETS +end + +def verify_java_release_targets + query = 'kind(maven_publish, set(//java/... //third_party/...))' + current_targets = [] + + Bazel.execute('query', [], query) do |output| + current_targets = output.lines.map(&:strip).reject(&:empty?).select { |line| line.start_with?('//') } + end + + missing_targets = current_targets - JAVA_RELEASE_TARGETS + extra_targets = JAVA_RELEASE_TARGETS - current_targets + + return if missing_targets.empty? && extra_targets.empty? + + error_message = 'Java release targets are out of sync with Bazel query results.' + + error_message += "\nMissing targets: #{missing_targets.join(', ')}" unless missing_targets.empty? + + error_message += "\nObsolete targets: #{extra_targets.join(', ')}" unless extra_targets.empty? + + raise error_message +end + # Notice that because we're using rake, anything you can do in a normal rake # build can also be done here. For example, here we set the default task task default: [:grid] @@ -364,7 +390,7 @@ end desc 'Install jars to local m2 directory' task :'maven-install' do - JAVA_RELEASE_TARGETS.each do |p| + java_release_targets.each do |p| Bazel.execute('run', ['--stamp', '--define', @@ -826,7 +852,7 @@ namespace :java do desc 'Build Java Client Jars' task :build do |_task, arguments| args = arguments.to_a.compact - JAVA_RELEASE_TARGETS.each { |target| Bazel.execute('build', args, target) } + java_release_targets.each { |target| Bazel.execute('build', args, target) } end desc 'Build Grid Server' @@ -873,7 +899,7 @@ namespace :java do Rake::Task['java:package'].invoke('--config=release') Rake::Task['java:build'].invoke('--config=release') # Because we want to `run` things, we can't use the `release` config - JAVA_RELEASE_TARGETS.each { |target| Bazel.execute('run', ['--config=release'], target) } + java_release_targets.each { |target| Bazel.execute('run', ['--config=release'], target) } end desc 'Install jars to local m2 directory' @@ -894,22 +920,19 @@ namespace :java do file_path = 'MODULE.bazel' content = File.read(file_path) - # For some reason ./go wrapper is not outputting from Open3, so cannot use Bazel class directly - output = `bazel run @maven//:outdated` - - output.scan(/\S+ \[\S+-alpha\]/).each do |match| - puts "WARNING — Cannot automatically update alpha version of: #{match}" + output = nil + Bazel.execute('run', [], '@maven//:outdated') do |out| + output = out end versions = output.scan(/(\S+) \[\S+ -> (\S+)\]/).to_h versions.each do |artifact, version| if artifact.match?('graphql') + # https://github.com/graphql-java/graphql-java/discussions/3187 puts 'WARNING — Cannot automatically update graphql' next end - - replacement = artifact.include?('googlejavaformat') ? "#{artifact}:jar:#{version}" : "#{artifact}:#{version}" - content.gsub!(/#{artifact}:(jar:)?\d+\.\d+[^\\"]+/, replacement) + content.sub!(/#{Regexp.escape(artifact)}:([\d.-]+(?:[-.]?[A-Za-z0-9]+)*)/, "#{artifact}:#{version}") end File.write(file_path, content) @@ -1087,7 +1110,7 @@ namespace :all do commit!('Update selenium manager version', ['common/selenium_manager.bzl']) Rake::Task['java:update'].invoke - commit!('Update Maven Dependencies', ['java/maven_deps.bzl', 'java/maven_install.json']) + commit!('Update Maven Dependencies', ['MODULE.bazel', 'java/maven_install.json']) Rake::Task['authors'].invoke commit!('Update authors file', ['AUTHORS']) @@ -1095,26 +1118,30 @@ namespace :all do # Note that this does not include Rust version changes that are handled in separate rake:version task # TODO: These files are all defined in other tasks; remove duplication Rake::Task['all:version'].invoke(version) - commit!("FIX CHANGELOGS BEFORE MERGING!\n\nUpdate versions and change logs to release Selenium #{java_version}", - ['dotnet/CHANGELOG', - 'dotnet/selenium-dotnet-version.bzl', - 'java/CHANGELOG', + commit!("Update Version in all bindings to #{java_version}", + ['dotnet/selenium-dotnet-version.bzl', 'java/version.bzl', - 'javascript/node/selenium-webdriver/CHANGES.md', + 'javascript/node/selenium-webdriver/BUILD.bazel', 'javascript/node/selenium-webdriver/package.json', 'py/docs/source/conf.py', + 'py/pyproject.toml', 'py/selenium/__init__.py', 'py/selenium/webdriver/__init__.py', 'py/BUILD.bazel', - 'py/CHANGES', 'rb/lib/selenium/webdriver/version.rb', - 'rb/CHANGES', 'rb/Gemfile.lock', - 'rust/CHANGELOG.md', 'rust/BUILD.bazel', 'rust/Cargo.Bazel.lock', 'rust/Cargo.toml', 'rust/Cargo.lock']) + + commit!("FIX CHANGELOGS BEFORE MERGING! #{java_version}", + ['dotnet/CHANGELOG', + 'java/CHANGELOG', + 'javascript/node/selenium-webdriver/CHANGES.md', + 'py/CHANGES', + 'rb/CHANGES', + 'rust/CHANGELOG.md']) end desc 'Update all versions' @@ -1191,16 +1218,25 @@ end def update_changelog(version, language, path, changelog, header) tag = previous_tag(version, language) - log = if language == 'javascript' - `git --no-pager log #{tag}...HEAD --pretty=format:"- %s" --reverse #{path}` - else - `git --no-pager log #{tag}...HEAD --pretty=format:"* %s" --reverse #{path}` - end - commits = log.split('>>>').map { |entry| - lines = entry.split("\n") - lines.reject! { |line| line.match?(/^(----|Co-authored|Signed-off)/) || line.empty? } - lines.join("\n") - }.join("\n>>>") + bullet = language == 'javascript' ? '- ' : '* ' + commit_delimiter = '===DELIM===' + tags_to_remove = /\[(dotnet|rb|py|java|js|rust)\]:?\s?/ + + command = "git --no-pager log #{tag}...HEAD --pretty=format:\"%s%n%b#{commit_delimiter}\" --reverse #{path}" + puts "Executing git command: #{command}" + + log = `#{command}` + + commits = log.split(commit_delimiter).map { |commit| + lines = commit.gsub(tags_to_remove, '').strip.lines.map(&:chomp) + subject = "#{bullet}#{lines[0]}" + + body = lines[1..] + .reject { |line| line.match?(/^(----|Co-authored|Signed-off)/) || line.empty? } + .map { |line| " > #{line}" } + .join("\n") + body.empty? ? subject : "#{subject}\n#{body}" + }.join("\n") File.open(changelog, 'r+') do |file| new_content = "#{header}\n#{commits}\n\n#{file.read}" diff --git a/WORKSPACE b/WORKSPACE index b33f16328442d..e82b52f11fa56 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -6,6 +6,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_closure", + integrity = "sha256-lJjlc2jvuCuYXbHtQmp2fL8boDmP167WMvw5CGVOGx4=", strip_prefix = "rules_closure-0.12.0", url = "https://github.com/bazelbuild/rules_closure/archive/refs/tags/0.12.0.tar.gz", ) diff --git a/common/devtools/chromium/v131/BUILD.bazel b/common/devtools/chromium/v134/BUILD.bazel similarity index 100% rename from common/devtools/chromium/v131/BUILD.bazel rename to common/devtools/chromium/v134/BUILD.bazel diff --git a/common/devtools/chromium/v131/browser_protocol.pdl b/common/devtools/chromium/v134/browser_protocol.pdl similarity index 97% rename from common/devtools/chromium/v131/browser_protocol.pdl rename to common/devtools/chromium/v134/browser_protocol.pdl index 49df8017971a7..b4a8eae76a3f7 100644 --- a/common/devtools/chromium/v131/browser_protocol.pdl +++ b/common/devtools/chromium/v134/browser_protocol.pdl @@ -117,6 +117,7 @@ experimental domain Accessibility # - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling. type AXPropertyName extends string enum + actions busy disabled editable @@ -498,8 +499,8 @@ experimental domain Audits type AffectedRequest extends object properties # The unique request id. - Network.RequestId requestId - optional string url + optional Network.RequestId requestId + string url # Information about the frame affected by an inspector issue. type AffectedFrame extends object @@ -517,6 +518,8 @@ experimental domain Audits ExcludeDomainNonASCII ExcludeThirdPartyCookieBlockedInFirstPartySet ExcludeThirdPartyPhaseout + ExcludePortMismatch + ExcludeSchemeMismatch type CookieWarningReason extends string enum @@ -540,6 +543,27 @@ experimental domain Audits SetCookie ReadCookie + # Represents the category of insight that a cookie issue falls under. + type InsightType extends string + enum + # Cookie domain has an entry in third-party cookie migration readiness + # list: + # https://github.com/privacysandbox/privacy-sandbox-dev-support/blob/main/3pc-migration-readiness.md + GitHubResource + # Cookie is exempted due to a grace period: + # https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period + GracePeriod + # Cookie is exempted due a heuristics-based exemptiuon: + # https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/heuristics-based-exception + Heuristics + + # Information about the suggested solution to a cookie issue. + type CookieIssueInsight extends object + properties + InsightType type + # Link to table entry in third-party cookie migration readiness list. + optional string tableEntryUrl + # This information is currently necessary, as the front-end has a difficult # time finding a specific cookie. With this, we can convey specific error # information without the cookie. @@ -559,6 +583,8 @@ experimental domain Audits optional string siteForCookies optional string cookieUrl optional AffectedRequest request + # The recommended solution to the issue. + optional CookieIssueInsight insight type MixedContentResolutionStatus extends string enum @@ -628,6 +654,7 @@ experimental domain Audits CorpNotSameOriginAfterDefaultedToSameOriginByDip CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip CorpNotSameSite + SRIMessageSignatureMismatch # Details for a request that has been blocked with the BLOCKED_BY_RESPONSE # code. Currently only used for COEP/COOP, but may be extended to include @@ -922,6 +949,7 @@ experimental domain Audits InvalidFieldsSpecified RelyingPartyOriginIsOpaque TypeNotMatching + UiDismissedNoEmbargo type FederatedAuthUserInfoRequestIssueDetails extends object properties @@ -957,6 +985,21 @@ experimental domain Audits string failureMessage optional Network.RequestId requestId + type SelectElementAccessibilityIssueReason extends string + enum + DisallowedSelectChild + DisallowedOptGroupChild + NonPhrasingContentOptionChild + InteractiveContentOptionChild + InteractiveContentLegendChild + + # This issue warns about errors in the select element content model. + type SelectElementAccessibilityIssueDetails extends object + properties + DOM.BackendNodeId nodeId + SelectElementAccessibilityIssueReason selectElementAccessibilityIssueReason + boolean hasDisallowedAttributes + type StyleSheetLoadingIssueReason extends string enum LateImportRule @@ -1017,6 +1060,7 @@ experimental domain Audits FederatedAuthUserInfoRequestIssue PropertyRuleIssue SharedDictionaryIssue + SelectElementAccessibilityIssue # This struct holds a list of optional fields with additional information # specific to the kind of issue. When adding a new issue code, please also @@ -1044,6 +1088,7 @@ experimental domain Audits optional PropertyRuleIssueDetails propertyRuleIssueDetails optional FederatedAuthUserInfoRequestIssueDetails federatedAuthUserInfoRequestIssueDetails optional SharedDictionaryIssueDetails sharedDictionaryIssueDetails + optional SelectElementAccessibilityIssueDetails selectElementAccessibilityIssueDetails # A unique id for a DevTools inspector issue. Allows other entities (e.g. # exceptions, CDP message, console messages, etc.) to reference an issue. @@ -1126,6 +1171,13 @@ experimental domain Extensions returns # Extension id. string id + # Uninstalls an unpacked extension (others not supported) from the profile. + # Available if the client is connected using the --remote-debugging-pipe flag + # and the --enable-unsafe-extension-debugging. + command uninstall + parameters + # Extension id. + string id # Gets data from extension storage in the given `storageArea`. If `keys` is # specified, these are used to filter the result. command getStorageItems @@ -1367,18 +1419,21 @@ domain Browser experimental type PermissionType extends string enum - accessibilityEvents + ar audioCapture - backgroundSync + automaticFullscreen backgroundFetch + backgroundSync + cameraPanTiltZoom capturedSurfaceControl clipboardReadWrite clipboardSanitizedWrite displayCapture durableStorage - flash geolocation + handTracking idleDetection + keyboardLock localFonts midi midiSysex @@ -1386,16 +1441,19 @@ domain Browser notifications paymentHandler periodicBackgroundSync + pointerLock protectedMediaIdentifier sensors - storageAccess + smartCard speakerSelection + storageAccess topLevelStorageAccess videoCapture - videoCapturePanTiltZoom + vr wakeLockScreen wakeLockSystem webAppInstallation + webPrinting windowManagement experimental type PermissionSetting extends string @@ -1668,6 +1726,14 @@ experimental domain CSS # Matches of CSS rules applicable to the pseudo style. array of RuleMatch matches + # CSS style coming from animations with the name of the animation. + type CSSAnimationStyle extends object + properties + # The name of the animation. + optional string name + # The style coming from the animation. + CSSStyle style + # Inherited CSS rule collection from ancestor node. type InheritedStyleEntry extends object properties @@ -1676,6 +1742,14 @@ experimental domain CSS # Matches of CSS rules matching the ancestor node in the style inheritance chain. array of RuleMatch matchedCSSRules + # Inherited CSS style collection for animated styles from ancestor node. + type InheritedAnimatedStyleEntry extends object + properties + # Styles coming from the animations of the ancestor, if any, in the style inheritance chain. + optional array of CSSAnimationStyle animationStyles + # The style coming from the transitions of the ancestor, if any, in the style inheritance chain. + optional CSSStyle transitionsStyle + # Inherited pseudo element matches from pseudos of an ancestor node. type InheritedPseudoElementMatches extends object properties @@ -1798,6 +1872,9 @@ experimental domain CSS experimental optional array of CSSScope scopes # The array keeps the types of ancestor CSSRules from the innermost going outwards. experimental optional array of CSSRuleType ruleTypes + # @starting-style CSS at-rule array. + # The array enumerates @starting-style at-rules starting with the innermost one, going outwards. + experimental optional array of CSSStartingStyle startingStyles # Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. # This list only contains rule types that are collected during the ancestor rule collection. @@ -1809,6 +1886,7 @@ experimental domain CSS LayerRule ScopeRule StyleRule + StartingStyleRule # CSS coverage information. type RuleUsage extends object @@ -1951,6 +2029,8 @@ experimental domain CSS optional DOM.PhysicalAxes physicalAxes # Optional logical axes queried for the container. optional DOM.LogicalAxes logicalAxes + # true if the query contains scroll-state() queries. + optional boolean queriesScrollState # CSS Supports at-rule descriptor. experimental type CSSSupports extends object @@ -1987,6 +2067,15 @@ experimental domain CSS # Identifier of the stylesheet containing this object (if exists). optional StyleSheetId styleSheetId + # CSS Starting Style at-rule descriptor. + experimental type CSSStartingStyle extends object + properties + # The associated rule header range in the enclosing stylesheet (if + # available). + optional SourceRange range + # Identifier of the stylesheet containing this object (if exists). + optional StyleSheetId styleSheetId + # CSS Layer data. experimental type CSSLayerData extends object properties @@ -2171,6 +2260,11 @@ experimental domain CSS parameters # Identifier of the frame where "via-inspector" stylesheet should be created. Page.FrameId frameId + # If true, creates a new stylesheet for every call. If false, + # returns a stylesheet previously created by a call with force=false + # for the frame's document if it exists or creates a new stylesheet + # (default: false). + optional boolean force returns # Identifier of the created "via-inspector" stylesheet. StyleSheetId styleSheetId @@ -2191,6 +2285,14 @@ experimental domain CSS # Element pseudo classes to force when computing the element's style. array of string forcedPseudoClasses + # Ensures that the given node is in its starting-style state. + command forceStartingStyle + parameters + # The element id for which to force the starting-style state. + DOM.NodeId nodeId + # Boolean indicating if this is on or off. + boolean forced + command getBackgroundColors parameters # Id of the node to get background colors for. @@ -2216,6 +2318,34 @@ experimental domain CSS # Computed style for the specified DOM node. array of CSSComputedStyleProperty computedStyle + # Resolve the specified values in the context of the provided element. + # For example, a value of '1em' is evaluated according to the computed + # 'font-size' of the element and a value 'calc(1px + 2px)' will be + # resolved to '3px'. + command resolveValues + parameters + # Substitution functions (var()/env()/attr()) and cascade-dependent + # keywords (revert/revert-layer) do not work. + array of string values + # Id of the node in whose context the expression is evaluated + DOM.NodeId nodeId + # Only longhands and custom property names are accepted. + optional string propertyName + # Pseudo element type, only works for pseudo elements that generate + # elements in the tree, such as ::before and ::after. + experimental optional DOM.PseudoType pseudoType + # Pseudo element custom ident. + experimental optional string pseudoIdentifier + returns + array of string results + + experimental command getLonghandProperties + parameters + string shorthandName + string value + returns + array of CSSProperty longhandProperties + # Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM # attributes) for a DOM node identified by `nodeId`. command getInlineStylesForNode @@ -2227,6 +2357,20 @@ experimental domain CSS # Attribute-defined element style (e.g. resulting from "width=20 height=100%"). optional CSSStyle attributesStyle + # Returns the styles coming from animations & transitions + # including the animation & transition styles coming from inheritance chain. + experimental command getAnimatedStylesForNode + parameters + DOM.NodeId nodeId + returns + # Styles coming from animations. + optional array of CSSAnimationStyle animationStyles + # Style coming from transitions. + optional CSSStyle transitionsStyle + # Inherited style entries for animationsStyle and transitionsStyle from + # the inheritance chain of the element. + optional array of InheritedAnimatedStyleEntry inherited + # Returns requested styles for a DOM node identified by `nodeId`. command getMatchedStylesForNode parameters @@ -2301,6 +2445,16 @@ experimental domain CSS returns array of SourceRange ranges + # Starts tracking the given node for the computed style updates + # and whenever the computed style is updated for node, it queues + # a `computedStyleUpdated` event with throttling. + # There can only be 1 node tracked for computed style updates + # so passing a new node id removes tracking from the previous node. + # Pass `undefined` to disable tracking. + experimental command trackComputedStyleUpdatesForNode + parameters + optional DOM.NodeId nodeId + # Starts tracking the given computed styles for updates. The specified array of properties # replaces the one previously specified. Pass empty array to disable tracking. # Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. @@ -2468,6 +2622,11 @@ experimental domain CSS # Identifier of the removed stylesheet. StyleSheetId styleSheetId + experimental event computedStyleUpdated + parameters + # The node id that has updated computed styles. + DOM.NodeId nodeId + experimental domain CacheStorage depends on Storage @@ -2677,8 +2836,10 @@ domain DOM enum first-line first-letter + checkmark before after + picker-icon marker backdrop column @@ -2691,8 +2852,7 @@ domain DOM first-line-inherited scroll-marker scroll-marker-group - scroll-next-button - scroll-prev-button + scroll-button scrollbar scrollbar-thumb scrollbar-button @@ -2709,8 +2869,6 @@ domain DOM placeholder file-selector-button details-content - select-fallback-button - select-fallback-button-text picker # Shadow root type. @@ -3388,15 +3546,17 @@ domain DOM optional NodeId nodeId # Returns the query container of the given node based on container query - # conditions: containerName, physical, and logical axes. If no axes are - # provided, the style container is returned, which is the direct parent or the - # closest element with a matching container-name. + # conditions: containerName, physical and logical axes, and whether it queries + # scroll-state. If no axes are provided and queriesScrollState is false, the + # style container is returned, which is the direct parent or the closest + # element with a matching container-name. experimental command getContainerForNode parameters NodeId nodeId optional string containerName optional PhysicalAxes physicalAxes optional LogicalAxes logicalAxes + optional boolean queriesScrollState returns # The container node for the given node, or null if not found. optional NodeId nodeId @@ -4070,56 +4230,6 @@ experimental domain DOMStorage parameters StorageId storageId -experimental domain Database - - # Unique identifier of Database object. - type DatabaseId extends string - - # Database object. - type Database extends object - properties - # Database ID. - DatabaseId id - # Database domain. - string domain - # Database name. - string name - # Database version. - string version - - # Database error. - type Error extends object - properties - # Error message. - string message - # Error code. - integer code - - # Disables database tracking, prevents database events from being sent to the client. - command disable - - # Enables database tracking, database events will now be delivered to the client. - command enable - - command executeSQL - parameters - DatabaseId databaseId - string query - returns - optional array of string columnNames - optional array of any values - optional Error sqlError - - command getDatabaseTableNames - parameters - DatabaseId databaseId - returns - array of string tableNames - - event addDatabase - parameters - Database database - experimental domain DeviceOrientation # Clears the overridden Device Orientation. @@ -5672,7 +5782,9 @@ domain Network # Unique loader identifier. type LoaderId extends string - # Unique request identifier. + # Unique network request identifier. + # Note that this does not identify individual HTTP requests that are part of + # a network request. type RequestId extends string # Unique intercepted request identifier. @@ -5926,6 +6038,7 @@ domain Network corp-not-same-origin-after-defaulted-to-same-origin-by-dip corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip corp-not-same-site + sri-message-signature-mismatch # The reason why request was blocked. type CorsError extends string @@ -6186,6 +6299,7 @@ domain Network preflight other # Initiator JavaScript stack trace, set for Script only. + # Requires the Debugger domain to be enabled. optional Runtime.StackTrace stack # Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. optional string url @@ -6365,6 +6479,10 @@ domain Network # The cookie's name/value pair size exceeded the size limit defined in # RFC6265bis. NameValuePairExceedsMaxSize + # The cookie's source port value does not match the request origin's port. + PortMismatch + # The cookie's source scheme value does not match the request origin's scheme. + SchemeMismatch # Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request. experimental type CookieExemptionReason extends string @@ -6389,6 +6507,8 @@ domain Network TopLevelStorageAccess # The cookie should have been blocked by 3PCD but is exempted by the first-party URL scheme. Scheme + # The cookie was included due to the 'allow-same-site-none-cookies' value being set in the sandboxing policy. + SameSiteNoneCookiesInSandbox # A cookie which was not stored from a response with the corresponding reason. experimental type BlockedSetCookieWithReason extends object @@ -7221,6 +7341,9 @@ domain Network # are represented by the invalid cookie line string instead of a proper cookie. array of BlockedSetCookieWithReason blockedCookies # Raw response headers as they were received over the wire. + # Duplicate headers in the response are represented as a single key with their values + # concatentated using `\n` as the separator. + # See also `headersText` that contains verbatim text for HTTP/1.*. Headers headers # The IP address space of the resource. The address space can only be determined once the transport # established the connection, so we can't send it in `requestWillBeSentExtraInfo`. @@ -7249,6 +7372,9 @@ domain Network # Request identifier. Used to match this information to another responseReceived event. RequestId requestId # Raw response headers as they were received over the wire. + # Duplicate headers in the response are represented as a single key with their values + # concatentated using `\n` as the separator. + # See also `headersText` that contains verbatim text for HTTP/1.*. Headers headers # Fired exactly once for each Trust Token operation. Depending on @@ -7274,6 +7400,7 @@ domain Network InternalError UnknownError FulfilledLocally + SiteIssuerLimit TrustTokenOperationType type RequestId requestId # Top level origin. The context in which the operation was attempted. @@ -7484,6 +7611,19 @@ domain Network returns LoadNetworkResourcePageResult resource + # Sets Controls for third-party cookie access + # Page reload is required before the new cookie bahavior will be observed + experimental command setCookieControls + parameters + # Whether 3pc restriction is enabled. + boolean enableThirdPartyCookieRestriction + + # Whether 3pc grace period exception should be enabled; false by default. + boolean disableThirdPartyCookieMetadata + + # Whether 3pc heuristics exceptions should be enabled; false by default. + boolean disableThirdPartyCookieHeuristics + # This domain provides various functionality related to drawing atop the inspected page. experimental domain Overlay depends on DOM @@ -8071,6 +8211,7 @@ domain Page ch-ua ch-ua-arch ch-ua-bitness + ch-ua-high-entropy-values ch-ua-platform ch-ua-model ch-ua-mobile @@ -8088,6 +8229,7 @@ domain Page controlled-frame cross-origin-isolated deferred-fetch + deferred-fetch-minimal digital-credentials-get direct-sockets direct-sockets-private @@ -8096,6 +8238,7 @@ domain Page encrypted-media execution-while-out-of-viewport execution-while-not-rendered + fenced-unpartitioned-storage-read focus-without-user-activation fullscreen frobulate @@ -9265,6 +9408,34 @@ domain Page experimental event frameResized + # Fired when a navigation starts. This event is fired for both + # renderer-initiated and browser-initiated navigations. For renderer-initiated + # navigations, the event is fired after `frameRequestedNavigation`. + # Navigation may still be cancelled after the event is issued. Multiple events + # can be fired for a single navigation, for example, when a same-document + # navigation becomes a cross-document navigation (such as in the case of a + # frameset). + experimental event frameStartedNavigating + parameters + # ID of the frame that is being navigated. + FrameId frameId + # The URL the navigation started with. The final URL can be different. + string url + # Loader identifier. Even though it is present in case of same-document + # navigation, the previously committed loaderId would not change unless + # the navigation changes from a same-document to a cross-document + # navigation. + Network.LoaderId loaderId + enum navigationType + reload + reloadBypassingCache + restore + restoreWithPost + historySameDocument + historyDifferentDocument + sameDocument + differentDocument + # Fired when a renderer-initiated navigation is requested. # Navigation may still be cancelled after the event is issued. experimental event frameRequestedNavigation @@ -9364,7 +9535,8 @@ domain Page # Default dialog prompt. optional string defaultPrompt - # Fired for top level page lifecycle events such as navigation, load, paint, etc. + # Fired for lifecycle events (navigation, load, paint, etc) in the current + # target (including local frames). event lifecycleEvent parameters # Id of the frame. @@ -10082,7 +10254,6 @@ experimental domain Storage # Enum of possible storage types. type StorageType extends string enum - appcache cookies file_systems indexeddb @@ -10715,6 +10886,7 @@ experimental domain Storage SignedInt64AsBase10 destinationLimitPriority AttributionReportingAggregatableDebugReportingConfig aggregatableDebugReportingConfig optional AttributionScopesData scopesData + integer maxEventLevelReports experimental type AttributionReportingSourceRegistrationResult extends string enum @@ -10825,6 +10997,7 @@ experimental domain Storage excessiveReportingOrigins noHistograms insufficientBudget + insufficientNamedBudget noMatchingSourceFilterData notRegistered prohibitedByBrowserPolicy @@ -10854,6 +11027,21 @@ experimental domain Storage returns array of RelatedWebsiteSet sets + # Returns the list of URLs from a page and its embedded resources that match + # existing grace period URL pattern rules. + # https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period + experimental command getAffectedUrlsForThirdPartyCookieMetadata + parameters + # The URL of the page currently being visited. + string firstPartyUrl + # The list of embedded resource URLs from the page. + array of string thirdPartyUrls + + returns + # Array of matching URLs. If there is a primary pattern match for the first- + # party URL, only the first-party URL is returned in the array. + array of string matchedUrls + # The SystemInfo domain defines methods and events for querying low-level system information. experimental domain SystemInfo @@ -11043,6 +11231,14 @@ domain Target string host integer port + # The state of the target window. + experimental type WindowState extends string + enum + normal + minimized + maximized + fullscreen + # Activates (focuses) the target. command activateTarget parameters @@ -11116,19 +11312,26 @@ domain Target parameters # The initial URL the page will be navigated to. An empty string indicates about:blank. string url - # Frame width in DIP (headless chrome only). + # Frame left origin in DIP (requires newWindow to be true or headless shell). + experimental optional integer left + # Frame top origin in DIP (requires newWindow to be true or headless shell). + experimental optional integer top + # Frame width in DIP (requires newWindow to be true or headless shell). optional integer width - # Frame height in DIP (headless chrome only). + # Frame height in DIP (requires newWindow to be true or headless shell). optional integer height + # Frame window state (requires newWindow to be true or headless shell). + # Default is normal. + optional WindowState windowState # The browser context to create the page in. experimental optional Browser.BrowserContextID browserContextId - # Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, + # Whether BeginFrames for this target will be controlled via DevTools (headless shell only, # not supported on MacOS yet, false by default). experimental optional boolean enableBeginFrameControl - # Whether to create a new Window or Tab (chrome-only, false by default). + # Whether to create a new Window or Tab (false by default, not supported by headless shell). optional boolean newWindow - # Whether to create the target in background or foreground (chrome-only, - # false by default). + # Whether to create the target in background or foreground (false by default, not supported + # by headless shell). optional boolean background # Whether to create the target of type "tab". experimental optional boolean forTab @@ -11463,6 +11666,8 @@ domain Fetch depends on Page # Unique request identifier. + # Note that this does not identify individual HTTP requests that are part of + # a network request. type RequestId extends string # Stages of the request to handle. Request will intercept before the request is @@ -11719,6 +11924,7 @@ experimental domain WebAudio suspended running closed + interrupted # Enum of AudioNode types type NodeType extends string @@ -12344,6 +12550,15 @@ experimental domain Preload array of RuleSetId ruleSetIds array of DOM.BackendNodeId nodeIds + # Chrome manages different types of preloads together using a + # concept of preloading pipeline. For example, if a site uses a + # SpeculationRules for prerender, Chrome first starts a prefetch and + # then upgrades it to prerender. + # + # CDP events for them are emitted separately but they share + # `PreloadPipelineId`. + type PreloadPipelineId extends string + command enable command disable @@ -12500,6 +12715,7 @@ experimental domain Preload event prefetchStatusUpdated parameters PreloadingAttemptKey key + PreloadPipelineId pipelineId # The frame id of the frame initiating prefetch. Page.FrameId initiatingFrameId string prefetchUrl @@ -12518,6 +12734,7 @@ experimental domain Preload event prerenderStatusUpdated parameters PreloadingAttemptKey key + PreloadPipelineId pipelineId PreloadingStatus status optional PrerenderFinalStatus prerenderStatus # This is used to give users more information about the name of Mojo interface diff --git a/common/devtools/chromium/v131/js_protocol.pdl b/common/devtools/chromium/v134/js_protocol.pdl similarity index 98% rename from common/devtools/chromium/v131/js_protocol.pdl rename to common/devtools/chromium/v134/js_protocol.pdl index b96102b7f8f79..e33cdae701a12 100644 --- a/common/devtools/chromium/v131/js_protocol.pdl +++ b/common/devtools/chromium/v134/js_protocol.pdl @@ -564,7 +564,8 @@ domain Debugger experimental optional array of LocationRange skipList # Fired when breakpoint is resolved to an actual script and location. - event breakpointResolved + # Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event. + deprecated event breakpointResolved parameters # Breakpoint unique identifier. BreakpointId breakpointId @@ -622,6 +623,13 @@ domain Debugger # URL of the external symbol source. optional string externalURL + type ResolvedBreakpoint extends object + properties + # Breakpoint unique identifier. + BreakpointId breakpointId + # Actual breakpoint location. + Location location + # Fired when virtual machine fails to parse the script. event scriptFailedToParse parameters @@ -641,6 +649,8 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash + # For Wasm modules, the content of the `build_id` custom section. + string buildId # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # URL of source map associated with script (if any). @@ -680,6 +690,8 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash + # For Wasm modules, the content of the `build_id` custom section. + string buildId # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # True, if this script is generated as a result of the live edit operation. @@ -702,6 +714,10 @@ domain Debugger experimental optional array of Debugger.DebugSymbols debugSymbols # The name the embedder supplied for this script. experimental optional string embedderName + # The list of set breakpoints in this script if calls to `setBreakpointByUrl` + # matches this script's URL or hash. Clients that use this list can ignore the + # `breakpointResolved` event. They are equivalent. + experimental optional array of ResolvedBreakpoint resolvedBreakpoints experimental domain HeapProfiler depends on Runtime @@ -1556,10 +1572,14 @@ domain Runtime # It is the total usage of the corresponding isolate not scoped to a particular Runtime. experimental command getHeapUsage returns - # Used heap size in bytes. + # Used JavaScript heap size in bytes. number usedSize - # Allocated heap size in bytes. + # Allocated JavaScript heap size in bytes. number totalSize + # Used size in bytes in the embedder's garbage-collected heap. + number embedderHeapUsedSize + # Size in bytes of backing storage for array buffers and external strings. + number backingStorageSize # Returns properties of a given object. Object group of the result is inherited from the target # object. diff --git a/common/devtools/chromium/v85/BUILD.bazel b/common/devtools/chromium/v85/BUILD.bazel deleted file mode 100644 index 6b4a4fe5c3f4a..0000000000000 --- a/common/devtools/chromium/v85/BUILD.bazel +++ /dev/null @@ -1,37 +0,0 @@ -package( - default_visibility = [ - "//dotnet/src/webdriver:__subpackages__", - "//java/src/org/openqa/selenium/devtools:__subpackages__", - "//javascript/node/selenium-webdriver:__pkg__", - "//py:__pkg__", - "//rb/lib/selenium/devtools:__pkg__", - ], -) - -genrule( - name = "browser_protocol", - srcs = [ - "browser_protocol.pdl", - ], - outs = [ - "browser_protocol.json", - ], - cmd = "$(location //common/devtools:pdl_to_json) $(location :browser_protocol.pdl) --map_binary_to_string=true $@", - tools = [ - "//common/devtools:pdl_to_json", - ], -) - -genrule( - name = "js_protocol", - srcs = [ - "js_protocol.pdl", - ], - outs = [ - "js_protocol.json", - ], - cmd = "$(location //common/devtools:pdl_to_json) $(location :js_protocol.pdl) --map_binary_to_string=true $@", - tools = [ - "//common/devtools:pdl_to_json", - ], -) diff --git a/common/devtools/chromium/v85/browser_protocol.pdl b/common/devtools/chromium/v85/browser_protocol.pdl deleted file mode 100644 index 5525f5d6beab8..0000000000000 --- a/common/devtools/chromium/v85/browser_protocol.pdl +++ /dev/null @@ -1,8024 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -# -# Contributing to Chrome DevTools Protocol: https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing - -version - major 1 - minor 3 - -experimental domain Accessibility - depends on DOM - - # Unique accessibility node identifier. - type AXNodeId extends string - - # Enum of possible property types. - type AXValueType extends string - enum - boolean - tristate - booleanOrUndefined - idref - idrefList - integer - node - nodeList - number - string - computedString - token - tokenList - domRelation - role - internalRole - valueUndefined - - # Enum of possible property sources. - type AXValueSourceType extends string - enum - attribute - implicit - style - contents - placeholder - relatedElement - - # Enum of possible native property sources (as a subtype of a particular AXValueSourceType). - type AXValueNativeSourceType extends string - enum - figcaption - label - labelfor - labelwrapped - legend - tablecaption - title - other - - # A single source for a computed AX property. - type AXValueSource extends object - properties - # What type of source this is. - AXValueSourceType type - # The value of this property source. - optional AXValue value - # The name of the relevant attribute, if any. - optional string attribute - # The value of the relevant attribute, if any. - 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