TestCafe v3.7.0 Released

The TestCafe v3.7.0 update includes the capability to use Metadata as an interface, esm configuration file option, and a number of bug fixes.

Declare Metadata Interface

Earlier versions of TestCafe supported Metadata as a type. In TestCafe v3.7.0 and higher, you should declare Metadata as an interface.

// testcafe.global.d.ts
declare module "testcafe" {
    global {
        interface Metadata {
            manual?: boolean,
        }
    }
}

New Configuration File Option: esm

Earlier versions of TestCafe supported the ESM Module from the CLI only. In TestCafe v3.7.0 and higher, you can use the esm configuration file option. Note that this option only works with Node.js 18.19-18.xx, and 20.8.0 and up.

Bug Fixes

  • CDP client tab creation causes a WebSocket connection closed error in Chrome v130 (#8286).
  • An unhandled promise rejection occurs while launching sub-windows (#8258).
  • Assertions that perform visibility checks fail despite elements being visible on the page (#8237).
  • The t.getCurrentCDPSession method returns unknown (#8228).
  • [Native Automation] Request hooks are applied to skipped tests (#8229).
  • A WebSocket connection closed error occurs while running TestCafe in Chrome v127. The updated version includes the --disable-search-engine-choice-screen flag (#8240).
  • A leaveElement method call causes an error when the prevElement object is removed from the DOM (#8264).