cdp4j Release Notes

Roadmap

5.4.0 - August 24, 2021

  • Improved libuv-java performance
  • Updated Playwright selectors version to 1.9.2
  • Depercated TaskKillProcessManager.java (Child processes still runs after the parent dies if chrome is executed with headless mode.
    This problem does not exist for headful mode.)
  • Added a new Launcher class that will support POSIX spawn, yeshup.
  • Updated DevTools protocol to version r882921.
  • WfExecLauncher is used as a default ProcessManger for Windows enviorment.

5.3.2 - May 14, 2021

  • Fixed invalid return type of DOMStorage.getDOMStorageItems()

5.3.1 - March 26, 2021

  • Pass all environment variables to WfExecLauncher otherwise, Chrome fails to get TEMP variable.
  • Improved SessionFactory.close(), getPage().close() method closes target internally, no need to invoke getTarget().close()
  • Fixed race condition while using blank pages.
    Do not reuse the blank page if the headless mode is enabled or chrome started externally
    If more than one clients try to reuse the same blank page, unexpected race conditions might occur.
  • Double check if session disposed. On under heavy load concurrent usage cdp4j throws “Session was disposed” exception.
  • Improved navigateAndWait, tried to get frame Id from different ways.
  • Fixed concurrency bug for JreWebSocketChannel. If multiple threads try to send websocket message
    JRE WebSocket throws IllegalStateException(“Send pending”) exception.
    This simple lock mechanism helps us to send WebSocket messages one by one in order.
  • Fixed, commandTypeReferences must cleared by SessionFactory.close()

5.3.0 - March 15, 2021

  • New Added Jackson support. It's highly recommend to use Jackson Instead of GSON to decrease the memory usage & cpu usage).
    Thanks to Pascal B. for early testing.
  • New Added JUnit 5 support (Experimental feature).
  • New Added log4j2 support.
  • New Updated the devtools protocol to r860858 (Mar 9, 2021).
  • Fixed log4j Reflection bug, Thanks to Niranjan R. for the fix.
  • Improved performance of Vertx, Undertow and nv-websocket & Jetty. These performance improvements require Jackson.

5.2.1 - March 5, 2021

  • New Added iframe supports (Thanks to AYCD for sponsorship)
  • Fixed NoSuchMethodException while using log4j

5.2.0 - February 15, 2021

  • New - Added CloseListener feature to Session and SessionFactory classes.
  • New - Added UserProfileDirectoryCleaner which clears the user profile directory when browser is terminated.
  • New - Dispose the Session and remove it from SessionFactory when the target (window/tab) crashed.
  • New - Launcher.kill() method closes the SessionFactory.
  • Update wf-exec library to version 1.1.0
  • List of contributions by Pascal B., Thank you.
  • Removed wait for termination for ps process in LinuxProcessManager & MacOsProcessManager.kill() - since it will never terminate before reading starts.
  • Allow override of launchWithProcessBuilder
  • Remove context from HashMap once consumed to avoid Memory Leak
  • Enable runtime domain during connect after attaching the eventListeners Otherwise we might miss existing runtime execution contexts.
  • New - Support connecting sessions (and removing them) without issuing page
    commands This is required to connect to non-page sessions to call
    commands like session.getCommand().getRuntime().runIfWaitingForDebugger()
  • New - Allow synchronous message handler
  • New - Make SessionFactory.getSessions available on public API
  • New - Make SessionFactory.getBrowserSession available on public API
  • New - Added option to create session for already attached target. This is required to properly use Target.setAutoAttach
  • New - Added missing Strings list to CaptureSnapshotResult

5.1.0 - January 15, 2021

  • Fixed -  “Target.closeTarget Specified target doesn’t support closing” error. Check if browser session is already closed before closing it.
  • Connect existing devtools server [new feature]
  • Added -  JUL (Java Logging) support
  • Added -  DevToolsConnection and DevToolsProfileConnection examples

5.0.0 - September 11, 2020

  • Added -  libuv support

  • Updated -  devtools protocol to r784747

  • Added -  JavaScript/QuickJS support. Example: bing.js, TestQuickJs.java

  • Added -  Playwright selector engine. Playwright supports multiple selector engines (css, text, xpath and Shadow DOM) used to query elements in the web page.
    Example: PlaywrightSelector.java

  • Added -  Microsoft Edge support

4.2.2 - February 17, 2020

  • Fixed - Revert read timeout exception to previous logic (v3.x)

  • Fixed - invalid json mapping (Expected BEGIN_OBJECT but was STRING at…)

4.2.1 - January 27, 2020

  • FIXED Launcher throws ClassFoundException when wf-exec library is missing.

4.2.0 - January 22, 2020

  • New - Added Vert.x WebSocket client support.
  • New - Added a new process executor (wf-exec). This feature available only for Windows platform.
    wf-exec help to kill all child processes when parent dies normally or abnormally. Sample usage: WfExecSample.java
  • Update devtools protocol r726364
  • New - Released cdp4j.jar to GitHub package. #118
  • Dropped graalvm8 supports. cdp4j supports only graalvm11.

4.1.0 - November 26, 2019

4.0.1 - October 10, 2019

New - Added Session.getDOMSnapshot() method (Returns a document snapshot, including the full DOM tree of the root node).

New - Added initial GraalVM support (this feature is not ready to use, wait until version 4.1.0)

Fixed Fixed buggy TaskKillProcessManager implementation.

4.0.0 - October 1, 2019

New - Added non-blocking WebSocket support

List of supported WebSocket clients:

  1. async-http-client (Netty based)
  2. Eclipse Jetty
  3. JRE WebSocket Client (requires Java 11, default WebSocket client of cdp4j 4.x)
  4. JSR-356 WebSocket Client (Tomcat WebSocket Client & Tyrus is supported)
  5. TooTallNate WebSocket client
  6. Undertow WebSocket client

Beside these WebSocket clients implementations we still supports nv-websocket-client
which is default WebSocket client of cdp4j 3.x.
We highly recommended to use a non-blocking WebSocket client implemntation instead of nv-websocket-client.
nv-websocket-client use java.net.Socket which blocks reading & writing threads.

non-blocking WebSocket client examples: Netty, Jetty, JRE WebSocket Client, JSR-356 WebSocketClient, TooTallNateWebSocketFactory, Undertow WebSocket Client

New - Replaced dynamic proxy based io.webfolder.cdp.command classes with concrete class implementations.

New - Added custom gson type adapter to improve json serialization & deserialization performance. cdp4j 4.x use stag-java to generate TypeAdapter classes. Default option still use reflection based TypeAdapter. Invoke Options.useCustomTypeAdapter(true) to use reflectionless (de)serialization.

New - Move to flatten cdp protocol.
DevTools protocol is dropping nested targets and switching to flatten protocol. cdp4j 4.x will be incompatible with Chromium below version 72

3.0.15 - December 12, 2019

  • Added connectionTimeout paramater to AbstractLauncher.launch()

3.0.14 - November 11, 2019

3.0.13 - October 11, 2019

  • Removed WINP dependency from TaskKillProcessManager

3.0.12 - June 25, 2019

  • Added Launcher.isChromeInstalled() method

3.0.11 - June 14, 2019

  • Fixed xpath selector bug

3.0.10 - June 14, 2019

3.0.9 - June 8, 2019

3.0.8 - January 14, 2019

  • Updated copyright date
  • Added missing getters

3.0.7 - November 29, 2018

  • Update websocket client library (nv-websocket-client) to 2.6
  • Roll devtools protocol to r608591
  • retry to get cdp4jId more than once
  • Selector.matches() return false instead of throwing exception

3.0.6 - August 15, 2018

  • Added @JsFunction annotation

3.0.5 - July 31, 2018

  • Fixed NullPointerException

3.0.4 - July 31, 2018

  • Added Added a new Constructor to Launcher class
  • Fixed ClassNotFoundException (org.jvnet.winp.WinProcess)

3.0.3 - July 26, 2018

  • Added MacOsProcessManager
  • Roll devtools protocol to r574367
  • Added Dom.getClickablePoint() and Dom.scrollIntoViewIfNeeded() method
  • Fixed Mouse.click() does not trigger click event if the element is not visible.

3.0.2 - July 9, 2018

  • Fixed ElementNotFoundException for xpath expressions
  • Fixed the wrong OS detection code and added human-readable error in case OS cannot be detected (ProcessManager)

3.0.1 - June 16, 2018

  • Removed sizzle support
  • Fixed concurrency bug (incognito mode)
  • Added Session.navigateAndWait() method
  • Added guard for Launcher.launch #95
  • Removed NullProcessManager (AdaptiveProcessManager is the new default ProcessManager)
  • Added Session.captureScreenshot(boolean hideScrollbar) method