Skip to content


Choose a tag to compare
@PavelMor25 PavelMor25 released this 25 Apr 11:46
· 7 commits to master since this release

TestCafe v3.6.0 Released

The TestCafe v3.6.0 update includes two minor changes and a number of bug fixes.

New method: t.getCurrentCDPSession

The t.getCurrentCDPSession method allows native automation users to examine and control the CDP connection between TestCafe and the browser.

Use the method to obtain the Chrome DevTools Protocol object for the current session. The CDP object exposes properties and methods that pertain to the CDP connection between TestCafe and the active browser window.

fixture `Get current CDP session`

test(`Get current CDP session`, async t => {
    const mainWindowId = await t.testRun.activeWindowId;

    let clientCDP = await t.getCurrentCDPSession();

    await t.expect(clientCDP.webSocketUrl).contains(mainWindowId);

Headless browser connection

TestCafe v3.6.0 takes advantage of the recent Chromium headless mode upgrade. The new headless mode offers better reliability and higher emulation accuracy.

The headless mode upgrade may cause unexpected changes to your tests' behavior. Take note of the following changes:

  • Headless Chromium now automatically upgrades insecure HTTP requests to HTTPS.
  • Headless Chromium does not always honor the --window-size flag. This behavior is a known Chromium bug.

Bug Fixes

  1. [Native automation] TestCafe does not execute the maximizeWindow() method in beforeEach hooks (#8117)
  2. If TestCafe launch options include --esm, the framework crashes on launch in environments with Node.JS v20 and up (#8132)
  3. The Linux-based Docker image of TestCafe cannot run tests in headless Chromium (#8145)
  4. TestCafe incorrectly crops Safari screenshots (#8154)