Skip to content

Releases: DevExpress/testcafe

v3.4.0-rc.3

09 Nov 07:57
d55e8b8
Compare
Choose a tag to compare
v3.4.0-rc.3 Pre-release
Pre-release

What’s Changed

v3.4.0-rc.2

02 Nov 07:50
b99c72c
Compare
Choose a tag to compare
v3.4.0-rc.2 Pre-release
Pre-release

What’s Changed

v3.4.0-rc.1

31 Oct 10:02
095273d
Compare
Choose a tag to compare
v3.4.0-rc.1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v3.3.0...v3.4.0-rc.1

v3.3.0

29 Aug 14:06
c4493a0
Compare
Choose a tag to compare

v3.3.0 (2023-08-29)

TestCafe v3.3.0 includes important bug fixes and quality of life improvements.

Bug Fixes

  • TestCafe terminates the test run when it attempts to parse an empty JSON file (#7935).
  • Firefox throws an unexpected error when TestCafe attempts to close the browser window (#7285).
  • [Native Automation] TestCafe ignores the --disable-multiple-windows option when you interact with a link that points to "target=_blank", or open a new window with the window.open method (#7916).
  • [Native Automation] TestCafe ignores the clientScripts directive when you mock HTTP requests (#7914).
  • [Native Automation] TestCafe hangs when it runs tests in the headless version of Google Chrome (#7898).
  • [Native Automation] TestCafe doesn't throw an error when the user attempts to enable the userProfile option (#7925).

v3.3.0-rc.2

25 Aug 15:03
4d3ef63
Compare
Choose a tag to compare
v3.3.0-rc.2 Pre-release
Pre-release

What’s Changed

v3.3.0-rc.1

23 Aug 09:52
d26cb24
Compare
Choose a tag to compare
v3.3.0-rc.1 Pre-release
Pre-release

What’s Changed

v3.2.0

17 Aug 17:11
e59b5f6
Compare
Choose a tag to compare

TestCafe v3.2.0 Released

TestCafe v3.2.0 allows you to check whether TestCafe uses native automation to control the browser.

Check your native automation status

The nativeAutomation property of the t.browser object indicates whether TestCafe uses native automation to control the browser. The property's value is true when TestCafe uses native automation and false when TestCafe uses the Hammerhead proxy.

You can check the browser's native automation status before you start the test:

import { Selector } from 'testcafe';

fixture`TestController.browser`
    .page`https://example.com`;

test('Native automation check', async t => {
    await t.expect(t.browser.nativeAutomation).ok();
    //the test continues only if you use native automation
});

Bug Fixes

  • TestCafe uses a version of the error-stack-parser package that contains a vulnerable dependency (PR #7919 by @sethidden).
  • TestCafe does not clear cookie storage if a Role activation URL is the same as the page URL (#7874).
  • [Native Automation] TestCafe incorrectly processes web pages with file inputs (#7886).

v3.2.0-rc.2

17 Aug 08:48
cfbc184
Compare
Choose a tag to compare
v3.2.0-rc.2 Pre-release
Pre-release

What’s Changed

v3.2.0-rc.1

16 Aug 10:08
Compare
Choose a tag to compare
v3.2.0-rc.1 Pre-release
Pre-release

What’s Changed

v3.1.0

27 Jul 11:05
8df03fe
Compare
Choose a tag to compare

TestCafe v3.1.0 Released

TestCafe v3.1.0 introduces two enhancements:

  • You can now respond to geolocation requests with the t.setNativeDialogHandler method.
  • Your tests and test reports can now reference a variable that stores the framework's version number.

Respond to geolocation requests

Main article: t.setNativeDialogHandler

Use the t.setNativeDialogHandler method to respond to geolocation requests.

  • Return an Error type object to Block geolocation requests.
  • Return an object with coordinates to trigger the success callback of the getCurrentPosition method.
// Test
test('Switch from "allow" to "block"', async t => {
  await t
    .setNativeDialogHandler((type) => {
        if (type === 'geolocation')
            return { timestamp: 12356, accuracy: 20, coords: {latitude: '34.15321262322903', longitude: '-118.25543996370723'}; // Passes this data to geolocation requests
        return null;
    });
    .click('#buttonGeo')
    .setNativeDialogHandler((type) => {
        if (type !== 'geolocation')
            return null;
    
        const err = new Error('Some error');
    
        err.code = 1;
    
        return err; // Blocks geolocation requests
    })
    .click('#buttonGeo');

Reference the framework's version in tests and test reports

Main article: Version Logger API

Earlier versions of TestCafe could output the framework's version number to the console:

CLI version

TestCafe 3.1.0 and up allows you to access the framework's version number in test code:

import { version } from 'testcafe';
console.log(`TestCafe version: ${version}`);

API version

To access the framework's version number in your custom reporter, reference the first argument (version) of the init method:

init (version) {
   this
      .write(`Using TestCafe ${version}`)
      .newline()
}

Bug fixes

  • TestCafe incorrectly reports test duration in concurrency mode (#1816).
  • TestCafe assigns a non-zero duration value to skipped tests, which leads to an unexpected increase in the total test run duration value (#7731).
  • [Native Automation] The setFileUpload method does not work (#7832).
  • [Native Automation] Request hooks cause tests to crash (#7846).
  • [Native Automation] TestCafe overrides page titles (#7833).
  • [Native Automation] If a website redirects the user to a new page before basic HTTP authentication is complete, the authentication process fails (#7852).
  • [Native Automation] The t.click action fails if the event handler accounts for pointer input pressure (#7867).
  • [Native Automation] TestCafe hangs when the browser yields a "Session with given ID not found" error (#7865,#7810).
  • [Native Automation] TestCafe cannot set the httpOnly flag when you use the t.setCookies method (#7793).