tree: beecd4aa1448b76e019af0603b093059414c8bea
  1. events/
  2. idealized/
  3. latest/
  4. noop/
  5. v147/
  6. v148/
  7. v149/
  8. BUILD.bazel
  9. CdpClientGenerator.java
  10. CdpEndpointFinder.java
  11. CdpInfo.java
  12. CdpVersionFinder.java
  13. Command.java
  14. Connection.java
  15. ConverterFunctions.java
  16. DevTools.java
  17. DevToolsException.java
  18. DevToolsProvider.java
  19. Event.java
  20. HasDevTools.java
  21. Message.java
  22. NetworkInterceptor.java
  23. package-info.java
  24. README.md
  25. Reply.java
  26. RequestFailedException.java
  27. SeleniumCdpConnection.java
  28. versions.bzl
java/src/org/openqa/selenium/devtools/README.md

CDP Bindings for Java

Before going through these steps, make sure the needed protocol file definitions are in the tree. Check this README for more information.

They are typically downloaded from the devtools source

  • Edit //java/src/org/openqa/selenium/devtools:versions.bzl to include the new version number (and possibly delete the old one, we tend to support only the last 3 versions). LATEST_CDP_VERSION is computed automatically from CDP_VERSIONS and does not need to be edited.
  • Copy the most recent //java/src/org/openqa/selenium/devtools/vXX to //java/src/org/openqa/selenium/devtools/vXX+1.
  • Do a search and replace in that directory, converting XX to XX+1
  • Add //java/src/org/openqa/selenium/devtools/vXX:vXX.publish version to the Rakefile.
  • Compile the code and fix the places where signatures have changed.

The selenium-devtools-latest artifact is a stable alias that republishes the protocol classes of LATEST_CDP_VERSION under the org.openqa.selenium.devtools.latest package. Users who don't want to update their imports on every Chrome bump can write:

import org.openqa.selenium.devtools.latest.page.Page;

The alias artifact contains only the generated protocol types; the runtime CdpInfo registration is provided by the versioned selenium-devtools-v<LATEST> artifact, which is pulled in as a transitive Maven dependency. The alias is rebuilt automatically when a new CDP version is added — no extra steps are required when bumping CDP_VERSIONS.