# Changelog ## v3.5.0 (2023-12-26) TestCafe v3.5.0 includes multiple enhancements and bug fixes. Pass Selector queries to the Visual Selector Debugger, explore new ways to specify screenshot path patterns, and use a new *experimental* flag to run multi-window tests with native automation! meta-readmore ### Pass Selector queries to the Visual Selector Debugger When you pass a Selector query to the [t.debug()](xref:402707) method, TestCafe uses the query to populate the input field of the Visual Selector Debugger. The debugger highlights page elements that match the query. ```js t.debug(Selector('#header')); ``` >[!Video https://www.screencast.com/users/testcafe/folders/Default/media/4274d757-f7a4-4982-add4-43bb0ba35cff/embed] ### Use a custom path pattern for screenshots of failed tests The `pathPatternOnFails` [screenshot option](xref:402639#-s---screenshots-optionvalueoption2value2) allows TestCafe users to define a separate set of naming rules for screenshots taken on test failure. You can store these screenshots in a different folder, or add a common, recognizable element to their filenames. You can use this option on its own, or in conjunction with the `pathPattern` property. ```json { "screenshots": { "pathPatternOnFails": "${DATE}_${TIME}/failedTests/test-${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}.png" } } ``` ### Specify a path pattern for individual screenshots Use the `pathPattern` option of the [t.takeScreenshot](xref:402675) action to specify a custom naming pattern for an individual screenshot: ```js t.takeScreenshot({ pathPattern: "${DATE}_${TIME}/checkout-screenshot.png", fullPage: true }) ``` ### (Experimental) Run multi-window tests with native automation TestCafe v2.5.0 was the first version of TestCafe to include [native automation](xref:404237) --- the capability to automate Chromium-based browsers with the native Chrome Debugging Protocol. This approach offers greater test stability and speed, but has a fair share of limitations. One of them is its incompatibility with multi-window tests. TestCafe v3.5.0 offers an experimental solution for this issue --- the [--experimental-multiple-windows](xref:402639#--experimental-multiple-windows) CLI flag. If you enable this flag, you can run multi-window tests with the native automation engine. The `--experimental-multiple-windows` mode does not support tests that include the following: * Pop-up windows that launch file downloads. * Browser window resizing. * Screenshots. * Video recording. Please do not use the `--experimental-multiple-windows` flag in production or for business-critical tasks. ### Bug Fixes * TypeScript compilation fails if project dependencies include '@babel/plugin-transorm-runtime' v7.23.3 or greater ([#8091](https://github.com/DevExpress/testcafe/issues/8091)). * If you enable concurrent test execution, TestCafe launches tests before the conclusion of the `fixture.before` hook ([#6999](https://github.com/DevExpress/testcafe/issues/6999)). * The `Fixture.disableConcurrency` method does not disable concurrent test execution ([8087](https://github.com/DevExpress/testcafe/issues/8087)). * TestCafe ignores the fullPage option when it takes screenshots on test failure ([#7761](https://github.com/DevExpress/testcafe/issues/7761)). * [Native Automation] TestCafe cannot populate file input fields with the `required` attribute ([#8079](https://github.com/DevExpress/testcafe/issues/8079)). * [Native Automation] TestCafe fails to execute tests that use service workers ([#8005](https://github.com/DevExpress/testcafe/issues/8005), [#8054](https://github.com/DevExpress/testcafe/issues/8054)). * When an action target is obscured by a sticky element, TestCafe incorrectly calculates the scroll distance necessary to interact with the target. ([#7377](https://github.com/DevExpress/testcafe/issues/7377)). * Incorrect processing of front-end scripts causes automation errors ([#7713](https://github.com/DevExpress/testcafe/issues/7713), [#8067](https://github.com/DevExpress/testcafe/issues/8067), [testcafe-hammerhead#2969](https://github.com/DevExpress/testcafe-hammerhead/issues/2969)). * TestCafe incorrectly processes failing network requests when it runs on Node.js v16 and greater ([#7097](https://github.com/DevExpress/testcafe/issues/7097)). * TestCafe incorrectly handles native dialogs in Mozilla Firefox ([#6815](https://github.com/DevExpress/testcafe/issues/6815)). ## v3.4.0 (2023-11-09) TestCafe v3.4.0 introduces relative Role URLs, the ability to disable concurrency on a per-fixture basis, as well as other improvements and bug fixes. meta-readmore ### Enhancements ### Relative Role URLs Earlier versions of TestCafe did not support relative URLs for [Role log-in pages](xref:402845). In TestCafe v3.4.0 and higher, if you set the [baseUrl](xref:402638#base-url) configuration file parameter or the [--base-url](xref:402639#--base-url) CLI option, you can set a relative URL for a Role log-in page: ```js import { Role } from 'testcafe'; const userOne = Role('./login', async t => { /* log-in actions go here */ }); ``` ### Disable concurrency on a per-fixture basis [Concurrent test execution](xref:403626) is not suitable for tests that can only run in a certain order. To ignore the global concurrency setting for a particular fixture, use the [disableConcurrency](xref:404618) fixture method. ```js fixture`Fixture.disableConcurrency` .page`https://devexpress.github.io/testcafe/example/` .disableConcurrency; ``` ### Development Mode Enhancements When you debug code inside a browser, the browser can appear unresponsive. Earlier versions of TestCafe automatically relaunched unresponsive browsers, including browsers that were used for debugging. TestCafe v3.4.0 *does not* relaunch unresponsive browsers if you enter [development mode](xref:402638#developmentmode). ### Debug Panel Enhancements The [debug panel](xref:404288) includes a new "Hide Picker" button. Click this button to disable the Selector Debugger and hide the Selector input field. ![Hide the Selector input field](https://testcafe.io/images/inspector/hide-selector-picker.gif) ### Bug Fixes * TestCafe incorrectly logs requests during concurrent test execution ([#7977](https://github.com/DevExpress/testcafe/issues/7977)). * TestCafe does not load images with non-lowercase `srcset` attribute declarations ([testcafe-hammerhead#2958](https://github.com/DevExpress/testcafe-hammerhead/issues/2958)). * TestCafe raises an unexpected client-side error when the application opens an `ngx-formly` form ([#7758](https://github.com/DevExpress/testcafe/issues/7758)). * TestCafe cannot interact with page items at the edge of the viewport when the browser emulates a mobile device ([#8057](https://github.com/DevExpress/testcafe/issues/8057)). ## 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](https://github.com/DevExpress/testcafe/issues/7935)). * Firefox throws an unexpected error when TestCafe attempts to close the browser window ([#7285](https://github.com/DevExpress/testcafe/issues/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](https://github.com/DevExpress/testcafe/issues/7916)). * [Native Automation] TestCafe ignores the clientScripts directive when you mock HTTP requests ([#7914](https://github.com/DevExpress/testcafe/issues/7914)). * [Native Automation] TestCafe hangs when it runs tests in the headless version of Google Chrome ([#7898](https://github.com/DevExpress/testcafe/issues/7898)). * [Native Automation] TestCafe doesn't throw an error when the user attempts to enable the `userProfile` option ([#7925](https://github.com/DevExpress/testcafe/issues/7925)). ## v3.2.0 (2023-08-17) 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](https://testcafe.io/documentation/402712/reference/test-api/testcontroller/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: ```js 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](https://github.com/DevExpress/testcafe/pull/7919) by [@sethidden](https://github.com/sethidden)). * TestCafe does not clear cookie storage if a Role activation URL is the same as the page URL ([#7874](https://github.com/DevExpress/testcafe/issues/7874)). * [Native Automation] TestCafe incorrectly processes web pages with file inputs ([#7886](https://github.com/DevExpress/testcafe/issues/7886)). ## v3.1.0 (2023-07-27) 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](https://testcafe.io/documentation/402684/reference/test-api/testcontroller/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](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition) to trigger the `success` callback of the [getCurrentPosition](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) method. ```js // 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](https://testcafe.io/documentation/404469/reference/version-logger-api) Earlier versions of TestCafe could output the framework's version number to the console: ![CLI version](https://testcafe.io/images/testcafe-version.png) TestCafe 3.1.0 and up allows you to access the framework's version number in test code: ```js import { version } from 'testcafe'; console.log(`TestCafe version: ${version}`); ``` ![API version](https://testcafe.io/images/output-testcafe-version.png) To access the framework's version number in your custom reporter, reference the first argument (`version`) of the `init` method: ```js init (version) { this .write(`Using TestCafe ${version}`) .newline() } ``` ### Bug fixes * TestCafe incorrectly reports test duration in concurrency mode ([#1816](https://github.com/DevExpress/testcafe/issues/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](https://github.com/DevExpress/testcafe/issues/7731)). * [Native Automation] The `setFileUpload` method does not work ([#7832](https://github.com/DevExpress/testcafe/issues/7832)). * [Native Automation] Request hooks cause tests to crash ([#7846](https://github.com/DevExpress/testcafe/issues/7846 )). * [Native Automation] TestCafe overrides page titles ([#7833](https://github.com/DevExpress/testcafe/issues/7833)). * [Native Automation] If a website redirects the user to a new page before basic HTTP authentication is complete, the authentication process fails ([#7852](https://github.com/DevExpress/testcafe/issues/7852)). * [Native Automation] The `t.click` action fails if the event handler accounts for [pointer input pressure](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure) ([#7867](https://github.com/DevExpress/testcafe/issues/7867)). * [Native Automation] TestCafe hangs when the browser yields a "Session with given ID not found" error ([#7865](https://github.com/DevExpress/testcafe/issues/7865),[#7810](https://github.com/DevExpress/testcafe/issues/7810)). * [Native Automation] TestCafe cannot set the `httpOnly` flag when you use the `t.setCookies` method ([#7793](https://github.com/DevExpress/testcafe/issues/7793)). ## v3.0.1 (2023-06-29) ### Bug fixes * The TestCafe status bar overlaps page elements, which leads to test execution issues ([#7797](https://github.com/DevExpress/testcafe/issues/7797)) * TestCafe outputs an unhelpful warning message when it cannot apply the artifact path template ([#7256](https://github.com/DevExpress/testcafe/issues/7256)) * A bug in the testcafe-browser-tools package causes TestCafe tests to hang on Ubuntu ([#7752](https://github.com/DevExpress/testcafe/issues/7752)) ## v3.0.0 (2023-06-21) This major update includes two **breaking changes**: * TestCafe v3.0.0 uses native CDP automation to run tests in Chromium-based browsers. * TestCafe v3.0.0 removes support for Internet Explorer. Other changes include: * You can now access test and fixture data in hooks. * You can now dismiss the `print` dialog with the native dialog handler. ### Native automation TestCafe v2.5.0 introduced an *experimental* mode that allows users to automate Chromium-based browsers, such as Google Chrome and Microsoft Edge, with the native CDP protocol. TestCafe v3.0.0 and up enables this capability out of the box. Native automation increases test quality, stability, and speed. * Read the ["TestCafe goes native"](https://testcafe.io/404431/resources/blog/2023-6-21-testcafe-goes-native) announcement for more information on the benefits of the new approach. * Read the [Native Automation FAQ](https://testcafe.io/documentation/404237/guides/intermediate-guides/native-automation-mode) for more information on the practical aspects of this capability. ### Access Test and Fixture data in hooks You can now access the following data in fixture hooks (`fixture.before`, `fixture.after`) : * Fixture name * Fixture metadata * Fixture path Test hooks (`fixture.beforeEach`, `fixture.afterEach`, `test.before`, `test.after`) can access fixture data **and** the following test data: * Test name * Test metadata ```js fixture `Example Fixture` .page `http://example.com` .meta({ fixtureMeta: 'v' }) .before( async (ctx, info) => { const fixtureName = info.name; /* Example Fixture */ const fixtureMeta = info.meta; /* { fixtureMeta: 'v' } */ const fixturePath = info.path /* /Users/dan/testcafe/fixture.js */ }); .beforeEach( async t => { const fixtureName = t.fixture.name; /* Example Fixture */ const fixtureMeta = t.fixture.meta; /* { fixtureMeta: 'v' } */ const fixturePath = t.fixture.path /* /Users/dan/testcafe/fixture.js */ const testName = t.test.name; /* MyTest */ const testMeta = t.test.meta; /* { 'key': 'value' } */ }) ``` Read the [Hooks guide](https://testcafe.io/documentation/403435/guides/intermediate-guides/hooks#access-fixture-and-test-data-in-hooks) for more information. ### Dismiss the print dialog You can now use the [t.setNativeDialogHandler](https://testcafe.io/documentation/402684/reference/test-api/testcontroller/setnativedialoghandler) method to dismiss the print dialog. ### Removed: Internet Explorer support TestCafe v3.0.0 removes support for Internet Explorer 11, six months after the browser's official [retirement](https://techcommunity.microsoft.com/t5/windows-it-pro-blog/internet-explorer-11-desktop-app-retirement-faq/ba-p/2366549). The browser came out more than 9 years ago, and has a worldwide market of less than [0.5%](https://gs.statcounter.com/browser-market-share). It is survived by Edge, a popular Chromium-based browser that ships with modern versions of Windows. ### Bug fixes * Some client functions yield a fatal error when the test navigates to a new page or removes an iframe ([#7707](https://github.com/DevExpress/testcafe/issues/7707)). * TestCafe fails to correctly modify certain request headers when it uses native automation ([#7748](https://github.com/DevExpress/testcafe/issues/7748)). * A bug in the CDP protocol causes TestCafe to incorrectly process request hooks ([#7743](https://github.com/DevExpress/testcafe/issues/7743)). * TestCafe outputs a vague error message if the framework fails to read or process the configuration file ([#7208](https://github.com/DevExpress/testcafe/issues/7208), [#6437](https://github.com/DevExpress/testcafe/issues/6437)). * TestCafe cannot select content with the "Ctrl+A" shortcut when the framework uses native automation ([#7667](https://github.com/DevExpress/testcafe/issues/7667)). * The Monaco editor does not display code completion hints when TestCafe automates it with CDP [#7770](https://github.com/DevExpress/testcafe/issues/7770). ## v2.6.2 (2023-06-01) TestCafe v2.6.2 introduces a number of bug fixes. ### Bug fixes * Internet Explorer 11 hangs because it cannot process client-side scripts that ship with TestCafe v2.6.1 ([#7741](https://github.com/DevExpress/testcafe/issues/7741)). * The `pressKey('space')` action doesn't affect checkbox status in Firefox ([#6969](https://github.com/DevExpress/testcafe/issues/6969)). ## v2.6.1 (2023-05-29) TestCafe v2.6.1 retires **Experimental Debug** mode, and introduces a number of important bug fixes. ### Removed: Experimental debug mode TestCafe v1.18.0 introduced [Experimental Debug mode](https://testcafe.io/403664/release-notes/framework/2021-12-22-testcafe-v1-18-0-released) --- a way to debug Selectors and Client Functions in the text editor. TestCafe v2.4.0 shipped with the [Visual Selector Debugger](https://testcafe.io/documentation/404288/guides/intermediate-guides/visual-selector-debugger), which allows users to troubleshoot Selector queries directly in the browser. The two capabilities serve the same purpose, but the Visual Selector Debugger is more user-friendly. As such, beginning with TestCafe v2.6.1, the framework **no longer includes** Experimental Debug mode. Thank you to all the TestCafe users who tried out the capability. ### Bug fixes * When TestCafe runs in Native Automation mode, Request Hooks yield an error ([#7683](https://github.com/DevExpress/testcafe/issues/7683)). * When TestCafe runs in Native Automation mode, the framework incorrectly processes pages with the pound sign ("#") in the URL ([#7652](https://github.com/DevExpress/testcafe/issues/7652)). * TestCafe incorrectly handles XHR headers in Native Automation mode ([#7664](https://github.com/DevExpress/testcafe/issues/7664), [#7686](https://github.com/DevExpress/testcafe/issues/7686), [#7645](https://github.com/DevExpress/testcafe/issues/7645)). * TestCafe reports an incorrect browser alias when it runs tests in Microsoft Edge ([#7647](https://github.com/DevExpress/testcafe/issues/7647)). * TestCafe fails to intercept all HTTP requests when it runs in Native Automation mode. ([#7640](https://github.com/DevExpress/testcafe/issues/7640)). * TestCafe cannot resize browser windows in the latest version of Chrome for macOS ([#7684](https://github.com/DevExpress/testcafe/issues/7684)). * TestCafe incorrectly processes client-side styles, causing slowdowns and errors ([#6726](https://github.com/DevExpress/testcafe/issues/6726), [#6747](https://github.com/DevExpress/testcafe/issues/6747)). * TestCafe crashes when you use the TestCafe Test Runner API to launch multiple tests simultaneously ([#7711](https://github.com/DevExpress/testcafe/issues/7711)). ## v2.6.0 (2023-05-11) TestCafe v2.6.0 introduces two enhancements: a new hook that allows users to modify reporter output, and support for JavaScript configuration files with the `.cjs` extension. ### New reporter hook The [onBeforeWrite](https://testcafe.io/documentation/404388/guides/advanced-guides/modify-reporter-output) hook allows you to modify the output of a reporter. If you want your test reports to include custom content, you can create a custom reporter from scratch. However, this approach takes time and effort. Use the `onBeforeWrite` hook if you want to make minor changes to the output of an existing reporter. Define an `onBeforeWrite` hook in a JavaScript configuration file. The following hook adds the duration in milliseconds to every test entry in the report: ```js //.testcaferc.js or .testcaferc.cjs function onBeforeWriteHook(writeInfo) { // This function will fire every time the reporter calls the "write" method. if (writeInfo.initiator === 'reportTestDone') { // The "initiator" property contains the name of the reporter event that triggered the hook. const { name, testRunInfo, meta } = writeInfo.data || {}; // If you attached this hook to a compatible reporter (such as "spec" or "list"), the hook can process data related to the event. const testDuration = testRunInfo.durationMs; // Save the duration of the test. writeInfo.formattedText = writeInfo.formattedText + ' (' + testDuration + 'ms)'; // Add test duration to the reporter output. }; } module.exports = { // Attach the hook hooks: { reporter: { onBeforeWrite: { 'spec': onBeforeWriteHook, // This hook will fire when you use the default "spec" reporter. }, }, }, }; ``` ![Reporter hook demonstration](https://testcafe.io/images/reporter-hook.png) ### CJS support If you run TestCafe v2.6.0 and higher, you can now use a configuration file with the `.cjs` file extension. TestCafe detects the `.testcaferc.cjs` file on startup, alongside its `.js` and `.json` counterparts. [TestCafe configuration files](https://testcafe.io/documentation/402638/reference/configuration-file) **only** support CommonJS syntax. Meanwhile, modern JavaScript tools often default to ESM syntax. If a JavaScript project is of type `module`, Node.js expects the project's `.js` files to contain ESM syntax. Use the `.cjs` configuration file extension to let Node.js know that the file contains CommonJS syntax. Many thanks to the TestCafe contributor Damien Guérin ([@gigaga](https://github.com/DevExpress/testcafe/pull/7614)) for the implementation of this capability. ### Bug fixes * If you call the `t.skipJsErrors` method without arguments, TestCafe passes a `false` value to the method. This behavior is inconsistent with similar methods of a greater scope --- `test.skipJsErrors` and `fixture.skipJsErrors` ([#7648](https://github.com/DevExpress/testcafe/issues/7648)). * Users cannot disable the "quarantine mode" or "skipJsErrors" settings from the command line ([#7077](https://github.com/DevExpress/testcafe/issues/7077)). * TestCafe incorrectly processes exceptions of types other than `Error` ([#7627](https://github.com/DevExpress/testcafe/issues/7627)). * TestCafe does not consistently execute the `t.pressKey` action in Mozilla Firefox. Attempts to press the "backspace" key and the "tab" key, among others, may fail. ([#7623](https://github.com/DevExpress/testcafe/pull/7623)) * When TestCafe runs in Native Automation mode, it incorrectly executes some instances of the `t.request` method. ([#7609](https://github.com/DevExpress/testcafe/issues/7609)) * The TestCafe proxy incorrectly processes private class properties in client-side scripts, which leads to page load failure ([#7632](https://github.com/DevExpress/testcafe/issues/7632), PR by [@sorin-davidoi](https://github.com/sorin-davidoi)). ## v2.5.0 (2023-04-06) TestCafe v2.5.0 introduces three major enhancements: * The new `t.report` method passes custom data to the test reporter. * The new `--native-automation` flag enables TestCafe to automate all Chromium-based browsers with the native CDP protocol. * The new `--esm` flag allows users to import ESM modules in test files. ### t.report Include the [t.report()](https://testcafe.io/documentation/404350/reference/test-api/testcontroller/report) method in your test to pass custom data to the reporter. Specify arguments of any type (string, array, Object, etc). Separate arguments with a comma: ```js await t.report( 'text', {'key': 'value'}, ['arrayItem1', 'arrayItem2'] ); ``` The default `spec` reporter displays custom data after test completion, once for each browser that runs the test. ![Report with custom data](https://testcafe.io/images/treport.png) ### CDP Automation: Now Stable TestCafe v2.2.0 introduced an experimental [proxyless mode](https://testcafe.io/documentation/404237/guides/intermediate-guides/native-automation-mode) that automated Google Chrome with the native CDP protocol. For the v2.5.0 release, the TestCafe team addressed most issues that our users discovered when the capability was "experimental", and gave it a new name --- Native Automation mode. Unlike its predecessor, the Native Automation mode supports **all** Chromium-based browsers, including Microsoft Edge. Enable the `nativeAutomation` option in the [command line interface](https://testcafe.io/documentation/402639/reference/command-line-interface#--native-automation), the [configuration file](https://testcafe.io/documentation/402638/reference/configuration-file#nativeautomation), or the [runner.run()](https://testcafe.io/documentation/402655/reference/testcafe-api/runner/run#nativeautomation) function to try this capability. > [!IMPORTANT] > TestCafe v2.5.0 removed the `experimentalProxyless` option from the [createTestCafe](https://testcafe.io/documentation/402662/reference/testcafe-api/global/createtestcafe) function. Use the [runner.run()](https://testcafe.io/documentation/402655/reference/testcafe-api/runner/run#nativeautomation) function to enable Native Automation mode from the TestCafe Test Runner API. ### ESM Module Support: Now Stable TestCafe v2.5.0 **drops** the `experimental` prefix from the `--esm` [CLI flag](https://testcafe.io/documentation/402639/reference/command-line-interface#--esm). Enable the `--esm` flag to import modules that do not support CommonJS. ```sh testcafe chrome test.js --esm ``` ## v2.4.0 (2023-03-06) TestCafe v2.4.0 introduces the Visual Selector Debugger. You can now create and debug Selector queries in the browser window. ### Visual Selector Debugger TestCafe v2.4.0 displays the Visual Selector Debugger panel when you activate [Debug Mode](https://testcafe.io/documentation/402835/guides/basic-guides/debug-tests). Use the panel to debug Selector queries from your test, or generate new Selector queries. ![](https://testcafe.io/images/inspector/enter-query.gif) If a Selector query causes your test to fail, add the [t.debug()](https://testcafe.io/documentation/402707/reference/test-api/testcontroller/debug) command after the last successful action, and launch the test. When the test reaches the breakpoint, the window that runs the test displays the Selector Debugger panel. Copy the failing Selector query from test code to the Selector Debugger input field. * TestCafe highlights page elements that match the Selector query. * If no elements match the Selector query, the panel displays the **No Matching Elements** warning. * If your Selector query contians a syntax error, the panel displays the **Invalid Selector** warning. To interactively generate a Selector query, click the **Pick** button, and select the target element on the page. For more information on the panel, its capabilities, and limitations, read the [Visual Selector Debugger Guide](https://testcafe.io/documentation/404288/guides/intermediate-guides/visual-selector-debugger). ### Bug Fixes * TestCafe cannot execute the [t.request](https://testcafe.io/documentation/403981/reference/test-api/testcontroller/request) action in [proxyless mode](https://testcafe.io/documentation/404237/guides/experimental-capabilities/proxyless-mode) ([#7523](https://github.com/DevExpress/testcafe/issues/7523)). ## v2.3.1 (2023-02-09) TestCafe v2.3.1 introduces a number of bug fixes. ### Bug Fixes * Client-side code with optional chaining may trigger a TestCafe error ([#7387](https://github.com/DevExpress/testcafe/issues/7387)). * TestCafe cannot interact with images from the Shadow DOM ([#7454](https://github.com/DevExpress/testcafe/issues/7454)). * TestCafe v2.3.0 fails to launch when the `test.meta` method precedes test code ([#7482](https://github.com/DevExpress/testcafe/issues/7482)). * When TestCafe launches a headless instance of Google Chrome in proxyless mode, it cannot interact with elements that are overlapped by the status bar ([#7483](https://github.com/DevExpress/testcafe/issues/7483)). ## v2.3.0 (2023-01-30) TestCafe v2.3.0 introduces `create-testcafe` --- an interactive tool that allows you to initialize a new TestCafe project in seconds. The update also includes *experimental* ECMAScript module support and a number of bug fixes. > **_IMPORTANT:_** > TestCafe v2.3.0 ends support for Node.js 14 due to a known vulnerability in the `babel-plugin-module-resolver` module. > > Install an up-to-date version of the Node.js runtime to use TestCafe v2.3.0 and up. > > The official maintenance period for Node.js 14 [elapses](https://endoflife.date/nodejs) on April 1st, 2023. ### create-testcafe Use the [create-testcafe](https://github.com/devexpress/create-testcafe) tool to initialize a new TestCafe project, or *add* TestCafe to an existing Node.js application. Execute the following command to launch `create-testcafe`: ```sh npx create-testcafe ``` ![example](https://testcafe.io/images/create-testcafe/wizard.gif) The `create-testcafe` tool allows you to perform the following actions with a single command: 1. Create a new folder for the TestCafe project *(optional)*. 2. Create a new local installation of TestCafe and its dependencies. 3. Create and initialize a TestCafe configuration file. 4. Create a separate subfolder for tests. 5. Populate the test folder with test examples *(optional)*. 6. Create a YAML file with a GitLab Actions workflow that runs TestCafe tests *(optional)*. Read the [TestCafe Setup Wizard guide](https://testcafe.io/documentation/404259/guides/best-practices/create-testcafe) for more information on the create-testcafe tool. ### Experimental: ECMAScript module support > **_IMPORTANT:_** > ESM module suppport works with Node.js 16 and up. TestCafe has always used *CommonJS* syntax for module imports: ```js const { x } = require('y'); ``` An increasing number of Node.JS packages abandon CommonJS in favour of [ECMAScript module syntax](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c): ```js import {x} from 'y' ``` Enable the `--experimental-esm` [CLI flag](https://testcafe.io/documentation/402639/reference/command-line-interface#--experimental-esm) to import modules that do not support CommonJS. Note: tests with ECMASCript module syntax are subject to [additional requirements](https://testcafe.io/404257/release-notes/framework/2023-1-30-testcafe-v2-3-0-released#additional-reuqirements). ```sh testcafe chrome test.js --experimental-esm ``` #### Additional Reuqirements To run tests with ECMAScript `import` statements, make sure that your project meets at least one of the following requirements: 1. The value of the `type` key in your project's [package.json file](https://nodejs.org/api/packages.html#packagejson-and-file-extensions) is `module`. 2. The test files in your project use the `.mjs` extension. ### Bug Fixes * TestCafe doesn't delete expired cookies ([#7432](https://github.com/DevExpress/testcafe/issues/7432)). * TestCafe cannot handle windows that appear when the user clicks a link with a `_blank` target ([#6926](https://github.com/DevExpress/testcafe/issues/6926)). * TestCafe fails to start because it triggers the `dns.setDefaultResultOrder` method in older Node.js environments ([#7447](https://github.com/DevExpress/testcafe/issues/7447)). * TestCafe depends on a vulnerable, outdated version of the `babel-plugin-module-resolver` package ([#7456](https://github.com/DevExpress/testcafe/issues/7456)). ## v2.2.0 (2022-12-29) TestCafe v2.2.0 introduces user-defined custom actions and an important *experimental* capability. Google Chrome users can now enable "proxyless mode" to speed up their test suite. ### Custom Action Support TestCafe users can now define [custom test actions](xref:404150). Place the definition function in a [**JavaScript** configuration file](xref:402638#customactions): ```js module.exports = { customActions: { async makeCoffee (args) { await this.click(args); }, } }; ``` Include custom methods in your tests alongside [other TestController methods](xref:402632#test-controller-api). Add the `customActions` prefix when you call the action: ```js test('Test with a custom action', async t => { await t.click() .customActions.makeCoffee() .click(); }) ``` ### Experimental: Proxyless mode TestCafe runs an under-the-hood [reverse proxy](xref:402631#page-proxying) to automate tests across different browsers. But this technique complicates the framework. Native automation protocols offer superior automation speeds and greater stability. That's why the TestCafe team decided to gradually phase the reverse proxy out in favor of native support for these automation protocols. TestCafe v2.2.0 includes an **experimental** option that disables the proxy for **Google Chrome**. ```sh testcafe chrome tests --experimental-proxyless ``` You can enable this option in the [command line interface](xref:402639#--experimental-proxyless), the [Test Runner API](xref:402662), and the [configuration file](xref:402638#experimentalproxyless). Read the [Proxyless mode guide](xref:404237) for more information. ### Bug Fixes * TestCafe doesn't hide the live mode status bar when the bar obstructs the action target ([#7384](https://github.com/DevExpress/testcafe/issues/7384)) * The 'Target element is overlapped' message does not reference the Selector that caused the warning ([#7386](https://github.com/DevExpress/testcafe/issues/7386)) * The TestCafe Dashboard reporter includes an outdated `uuid` dependency ([testcafe-reporter-dashboard#111](https://github.com/DevExpress/testcafe-reporter-dashboard/issues/111)) * TestCafe doesn't display the correct error message when the framework throws an exception ([#6936](https://github.com/DevExpress/testcafe/issues/6936)) * TestCafe retains some cookies after the user requests their deletion (PR [testcafe-hammerhead#2818](https://github.com/DevExpress/testcafe-hammerhead/pull/2818)) * TestCafe cannot load test pages with the `localhost` URL on Node.js v17 and up ([#7396](https://github.com/DevExpress/testcafe/issues/7396)) * TestCafe cannot take screenshots in headless Chrome on Node.js v17 and up ([#7408](https://github.com/DevExpress/testcafe/issues/7408)) * Web workers that originate from Blob URLs throw an error when they call the `importScript` function ([#7378](https://github.com/DevExpress/testcafe/issues/7378)) * TestCafe doesn't set the correct `Request` header when an `iframe` points the user to a new URL ([#7376](https://github.com/DevExpress/testcafe/issues/7376), PR [testcafe-hammerhead#2813](https://github.com/DevExpress/testcafe-hammerhead/pull/2813) by [@naggingant](https://github.com/naggingant)) * TestCafe cannot interact with options that belong to a `` elements ([#5616](https://github.com/DevExpress/testcafe/issues/5616)) * TestCafe does not load some cross-domain iframes ([#6633](https://github.com/DevExpress/testcafe/issues/6633)) * TestCafe incorrectly sets the Document.referrer property in Chrome 89 ([#6144](https://github.com/DevExpress/testcafe/issues/6144)) * Tests hang when the test page initiates a file download ([#5796](https://github.com/DevExpress/testcafe/issues/5796)) * Requests fail because TestCafe incorrectly handles dynamic content security policy ([#6057](https://github.com/DevExpress/testcafe/issues/6057)) * TestCafe triggers pointerdown event handlers twice ([#5891](https://github.com/DevExpress/testcafe/issues/5891)) * TestCafe cannot trigger click event handlers for Angular buttons with the "disabled" attribute ([#5240](https://github.com/DevExpress/testcafe/issues/5240)) ## v1.18.1 (2021-12-23) ### macOS Bug Fix TestCafe fails to launch Safari after the v1.18.0 update. ## v1.18.0 (2021-12-22) TestCafe v1.18.0 includes a new experimental Selector debugging capability, important improvements for macOS users and a number of routine bug fixes. If you run TestCafe on macOS, follow the [Upgrade Guide](https://testcafe.io/403664/release-notes/framework/2021-12-22-testcafe-v1-18-0-released#upgrade-instructions) to make sure your upgrade goes smoothly. ### New Debugging Capabilities (Experimental) If you launch TestCafe with the `--experimental-debug` flag, you can debug Selectors and Client Functions in the Watch panel of a Node.js debugger. ### macOS improvements #### TestCafe Browser Tools on Apple Silicon The TestCafe Browser Tools package is a communication layer that automates browsers on behalf of TestCafe. Both the TestCafe framework and TestCafe Studio include the TestCafe Browser Tools binary. Earlier versions of TestCafe Browser Tools were optimized for the x86-64 architecture. [Apple Silicon Macs](https://support.apple.com/en-gb/HT211814/) ran those binaries through the [Rosetta 2 translation layer](https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment/). Rosetta 2 took up additional space and prevented TestCafe from taking full advantage of the processor. TestCafe v1.18.0 includes a **Universal** TestCafe Browser Tools binary that runs natively on both x64 Macs **and** Apple Silicon Macs. Follow the [Upgrade Instructions](https://testcafe.io/403664/release-notes/framework/2021-12-22-testcafe-v1-18-0-released#upgrade-instructions) to make sure your version of TestCafe Browser Tools is up to date. #### TestCafe Browser Tools macOS Permission Fix The TestCafe Browser Tools binary requires special privileges to automate browsers and take screenshots. Security improvements in recent versions of macOS made these privileges harder to obtain. Prior to TestCafe v1.18.0, each installation of TestCafe and TestCafe Studio included a TestCafe Browser Tools binary. macOS users with multiple sets of TestCafe Browser Tools had to go through a lengthy process to obtain the necessary permissions. TestCafe v1.18.0 and TestCafe Studio v1.7 address this issue. Beginning with this version, all TestCafe installations share a single TestCafe Browser Tools binary. TestCafe stores this binary in the user's Home directory, inside the hidden `~/.testcafe-browser-tools` folder. Follow the [Upgrade Instructions](https://testcafe.io/403664/release-notes/framework/2021-12-22-testcafe-v1-18-0-released#upgrade-instructions) to reset TestCafe Browser Tools' permissions and enable the new binary. ### Bug Fixes * TestCafe immediately closes new windows ([#6680](https://github.com/DevExpress/testcafe/issues/6680)) * Tests fail with the `TypeError: Invalid value used as weak map key.` error ([#6563](https://github.com/DevExpress/testcafe/issues/6563)) * The latest version of the TestCafe Docker image cannot connect to Chrome and Chromium ([#6436](https://github.com/DevExpress/testcafe/issues/6436)) * TestCafe loses test error call stack and outputs the following message instead: `"Uncaught object "[object Object]"` (Issue [#6624](https://github.com/DevExpress/testcafe/issues/6624). Discovered by [@danieltroger](https://github.com/DevExpress/testcafe/issues/6624#issuecomment-975918371), PR by [@rob4629](https://github.com/DevExpress/testcafe/pull/6719).) * Lack of definitions for two new timeout options results in TypeScript compilation errors ([#6713](https://github.com/DevExpress/testcafe/issues/6713)) * TypeScript filter functions erroneously require a Promise return value ([#6705](https://github.com/DevExpress/testcafe/issues/6705)) ## v1.17.1 (2021-11-11) ### Bug Fixes - TestCafe incorrectly reads the 'reporter' configuration file option ([#6665](https://github.com/DevExpress/testcafe/issues/6665), [#6594](https://github.com/DevExpress/testcafe/issues/6594)). - An error report displays multiple warnings when you debug a test in headless mode ([#6605](https://github.com/DevExpress/testcafe/issues/6605)). - The testcafe-hammerhead proxy fails to load a web page ([testcafe-hammerhead/#2708](https://github.com/DevExpress/testcafe-hammerhead/issues/2708)). ## v1.17.0 (2021-11-02) ### Enhancements #### Global Test and Fixture Hooks You can now specify [global test and fixture hooks](https://testcafe.io/documentation/403435/guides/advanced-guides/hooks#global-hooks). TestCafe attaches these hooks to every test / fixture in the test suite. ```js module.exports = { hooks: { fixture: { before: async (ctx) => { // your code }, after: async (ctx) => { // your code } }, test: { before: async (t) => { // your code }, after: async (t) => { // your code } } } }; ``` #### Execution Timeouts You can now specify custom timeouts for tests and test runs. If a test/test run is idle or unresponsive for the specified length of time, TestCafe terminates it. Specify these timeouts in the [configuration file](https://testcafe.io/documentation/402638/reference/configuration-file) or from the [command line](https://testcafe.io/documentation/402639/reference/command-line-interface). **Command line interface** ```sh testcafe chrome my-tests --test-execution-timeout 180000 testcafe chrome my-tests --run-execution-timeout 180000 ``` **Configuration file** ```json { "runExecutionTimeout": 180000, "testExecutionTimeout": 180000 } ``` ### Bug Fixes - TestCafe fails to continue the test after the user downloads a file. ([#6242](https://github.com/DevExpress/testcafe/issues/6242)). - The TestCafe proxy does not fire the "unpipe" event when necessary. This omission leads to the "This socket has been ended by the other party" error ([#6558](https://github.com/DevExpress/testcafe/issues/6558)). - TestCafe incorrectly handles rewritten uninitialized iframes ([testcafe-hammerhead/#2694](https://github.com/DevExpress/testcafe-hammerhead/issues/2694), [testcafe-hammerhead/#2693](https://github.com/DevExpress/testcafe-hammerhead/issues/2693)). ## v1.16.1 (2021-10-05) ### Bug Fixes * Incorrect handling of the beforeInput Firefox event ([#6504](https://github.com/DevExpress/testcafe/issues/6504)) * Incorrect handling of page styles leads to test failure in Safari 15 ([#6546](https://github.com/DevExpress/testcafe/issues/6546)) * Incorrect stylesheet filtering procedure leads to client-side errors in IE11 ([#6439](https://github.com/DevExpress/testcafe/issues/6439)) ## v1.16.0 (2021-09-08) ### Enhancements #### Support for JavaScript configuration files You can now store TestCafe settings in a `js` file. Configuration properties in JavaScript files can reference JavaScript methods, functions and variables, which makes it easy to create dynamic configuration files. Just `export` the JSON name/value pairs in the file: ```js module.exports = { skipJsErrors: true, hostname: "localhost", // other settings } ``` #### Support for custom user variables in the configuration file TestCafe v1.16.0 and later supports configuration files with variable declarations. Users can reference variables from a configuration file in the tests that utilize that configuration file. To enable access to configuration file variables, import the `userVariables` object from the `testcafe` module at the beginning of the test script. This capability can come in handy if there's a single piece of data you want to use in multiple tests — for example, the website's URL. That way, if your website moves to a new domain name, you don't have to change your tests one by one. If you previously used environment variables to achieve the same goal, you might prefer the new method — it significantly simplifies the setup process, and allows you to commit the data to a version control system. Define your custom variables with the `userVariables` JSON object: ```JSON { "userVariables": { "url": "http://devexpress.github.io/testcafe/example", } } ``` Reference this variable in your test: ```js import { userVariables } from 'testcafe'; fixture `Test user variables` .page(userVariables.url); test('Type text', async t => { await t .typeText('#developer-name', 'John Smith') .click('#submit-button'); }); ``` #### Other enhancements * New option that disables thumbnail generation for test screenshots ([PR by @taki-fw](https://github.com/DevExpress/testcafe/pull/6078)). * New `embedding-utils` API method that retrieves information about skipped tests ([PR by @flora8984461](https://github.com/DevExpress/testcafe/pull/6398)). * The `Runner.filter` function supports asynchronous arguments ([PR by @eignatyev](https://github.com/DevExpress/testcafe/pull/6371)). * You can import the `test` and `fixture` objects directly from the `testcafe` module ([PR #6338](https://github.com/DevExpress/testcafe/pull/6338)). ### Bug Fixes * TestCafe does not keep track of file changes in live mode ([#6481](https://github.com/DevExpress/testcafe/issues/6481)). ## v1.15.3 (2021-08-19) ### Bug Fixes * TestCafe throws an error if you use the 'all' alias in the command line to run tests in all installed browsers ([#6456](https://github.com/DevExpress/testcafe/issues/6456)). * TestCafe does not check if the configuration file exists ([#6337](https://github.com/DevExpress/testcafe/issues/6337)). * TestCafe cannot disable HTTP/2 to avoid compatibility issues ([testcafe-hammerhead/#2681](https://github.com/DevExpress/testcafe-hammerhead/pull/2681)). * TestCafe works incorrectly if you use extended Function objects ([testcafe-hammerhead/#2439](https://github.com/DevExpress/testcafe-hammerhead/issues/2439)). * TestCafe processes a test application incorrectly if it uses the Immutable.js library ([testcafe-hammerhead/#2669](https://github.com/DevExpress/testcafe-hammerhead/issues/2669)). * TestCafe adds an element incorrectly into a nested body element ([PR testcafe-hammerhead/#2682](https://github.com/DevExpress/testcafe-hammerhead/pull/2682)). ## v1.15.2 (2021-08-11) ### Bug Fixes * TestCafe fails to emulate the `tab` action if a page contains a cross-domain iframe ([#6405](https://github.com/DevExpress/testcafe/issues/6405)). * TestCafe ignores the quarantine mode options if you specify the configuration file ([#6420](https://github.com/DevExpress/testcafe/issues/6420)). * TestCafe test fails if you specify a custom option as a command line argument ([#6426](https://github.com/DevExpress/testcafe/issues/6426)) * The [ERR_HTTP2_GOAWAY_SESSION](https://nodejs.org/api/errors.html#errors_err_http2_goaway_session) error occurs randomly when you use HTTP/2 protocol ([testcafe-hammerhead/#2653](https://github.com/DevExpress/testcafe-hammerhead/issues/2653)). * TestCafe fails if a page contains overridden getters for target elements ([testcafe-hammerhead/#2662](https://github.com/DevExpress/testcafe-hammerhead/issues/2662)). * TestCafe incorrectly processes scripts that destruct empty elements ([testcafe-hammerhead/#2670](https://github.com/DevExpress/testcafe-hammerhead/issues/2670)). ## v1.15.1 (2021-07-28) ### Bug Fixes * The `Element.getAttribute` method returns an incorrect value ([#5984](https://github.com/DevExpress/testcafe/issues/5984)). * TestCafe test fails when you forget to include the `await` keyword before the assertion statement ([#4613](https://github.com/DevExpress/testcafe/issues/4613)). * TestCafe fails to focus an element inside a shadow DOM ([#4988](https://github.com/DevExpress/testcafe/issues/4988)). * TestCafe fails to focus SVG elements ([#6262](https://github.com/DevExpress/testcafe/issues/6262)). * TestCafe raises the blur event when you focus a non-focusable element ([#6236](https://github.com/DevExpress/testcafe/pull/6236)). * TestCafe test hangs when you click a link within a cross-domain iframe ([#6331](https://github.com/DevExpress/testcafe/pull/6331)). * TestCafe loads the Babel compiler libraries multiple times ([#6310](https://github.com/DevExpress/testcafe/pull/6310)). * TestCafe incorrectly parses the meta refresh tags ([PR testcafe-hammerhead/#2663](https://github.com/DevExpress/testcafe-hammerhead/pull/2663)) * TestCafe incorrectly processes iframe elements with the "srcdoc" attribute ([testcafe-hammerhead/#2647](https://github.com/DevExpress/testcafe-hammerhead/issues/2647)). * TestCafe incorrectly specifies the Referer HTTP request header if you use the "navigateTo" action ([testcafe-hammerhead/#2607](https://github.com/DevExpress/testcafe-hammerhead/issues/2607)). * An error related to the [bug in Node.js](https://github.com/nodejs/node/issues/37849) occurs ([testcafe-hammerhead/#2655](https://github.com/DevExpress/testcafe-hammerhead/pull/2655)). ## v1.15.0 (2021-07-08) ### Enhancements #### Dispatch DOM events ([PR #6103](https://github.com/DevExpress/testcafe/pull/6103)) ```plaintext t.dispatchEvent(target, eventName[, options]) ``` The [`t.dispatchEvent`](https://testcafe.io/documentation/402712/reference/test-api/testcontroller/dispatchevent) method lets you interact with the page in ways that TestCafe does not support out of the box. To implement an unsupported user action, break it down into discrete DOM events, and use the `t.dispatchEvent` method to fire them. >Internet Explorer does [not](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event) support event constructors. As such, TestCafe cannot dispatch DOM events in this browser. The following example fires a `touchstart` action on an element with the 'button' id: ```js await t.dispatchEvent('#button', 'touchstart', { eventConstructor: 'TouchEvent' }); ``` Read the [Custom Actions Guide](https://testcafe.io/documentation/402843/guides/advanced-guides/custom-actions) for more information on DOM events and event constructors. #### Quarantine mode customization ([PR #6073](https://github.com/DevExpress/testcafe/pull/6073) by @rob4629) New settings are available in [quarantine mode](https://testcafe.io/documentation/402830/guides/basic-guides/run-tests#quarantine-mode). Quarantine mode repeats failing tests to help users get conclusive test results in sub-optimal conditions. TestCafe v1.15 adds two variables - `successThreshold` and `attemptLimit` - that allow you specify when TestCafe must stop. The `attemptLimit` variable determines the maximum possible number of test attempts. The `successThreshold` variable determines the number of successful attempts necessary for the test to pass. ```js testcafe chrome ./tests/ -q attemptLimit=5, successThreshold=2 ``` #### Password obfuscation ([#6014](https://github.com/DevExpress/testcafe/issues/6014)) TestCafe reporters no longer receive the contents of `password` input fields, unless you explicitly specify otherwise. This improves security for users that store their test results online. #### Support for non-HTML documents ([#1471](https://github.com/DevExpress/testcafe/issues/1471)) TestCafe now has the capability to proxy non-HTML documents such as XML and text files. Tests no longer hang upon redirection to a non-HTML address. ### Bug Fixes * TestCafe doesn't raise an error if users specify the CDP port but do not enable concurrency ([PR #6268](https://github.com/DevExpress/testcafe/pull/6268)). * TestCafe incorrectly processes elements with negative tabIndex values ([#4848](https://github.com/DevExpress/testcafe/issues/4848)). * TestCafe incorrectly processes some eventListeners in multi-window mode ([#5621](https://github.com/DevExpress/testcafe/issues/5621)). * TestCafe incorrectly processes the \ HTML tag ([testcafe-hammerhead/#1965](https://github.com/DevExpress/testcafe-hammerhead/issues/1965)). * TestCafe doesn't intercept `Navigator.prototype` requests ([PR testcafe-hammerhead/#2643](https://github.com/DevExpress/testcafe-hammerhead/pull/2643) by [@michaelficarra](https://github.com/michaelficarra)). * TestCafe doesn't intercept `WorkerGlobalScope.importScripts()` arguments ([testcafe-hammerhead/#2521](https://github.com/DevExpress/testcafe-hammerhead/issues/2521)). * A website parsing error causes test failure ([testcafe-hammerhead/#2650](https://github.com/DevExpress/testcafe-hammerhead/issues/2650)). * TestCafe stops recording test videos after you skip a fixture ([#6163](https://github.com/DevExpress/testcafe/issues/6163)). * Links with empty `download` attributes cause TestCafe to hang ([#6132](https://github.com/DevExpress/testcafe/issues/6132)). * TestCafe reports incorrect line numbers ([#5642](https://github.com/DevExpress/testcafe/issues/5642)). * TestCafe incorrectly processes some for-of statements ([PR testcafe-hammerhead/#2632](https://github.com/DevExpress/testcafe-hammerhead/pull/2632)). * TestCafe sometimes directs window location queries to non-window objects ([testcafe-hammerhead/#2611](https://github.com/DevExpress/testcafe-hammerhead/issues/2611)). * Performance enhancement: obtaining element attributes ([#6117](https://github.com/DevExpress/testcafe/issues/6117)) ## v1.14.2 (2021-05-13) ## Bug Fixes * Fixed a bug that caused the `The "--quarantine-mode" option value is not a valid key-value pair` error ## v1.14.1 (2021-05-12) ## Bug Fixes * Fixed a bug that caused TestCafe to hang during the execution of TestCafe Studio tests ([#5207](https://github.com/DevExpress/testcafe/issues/5207)) * Added a type definition for the `disableScreenshots` Runner option ([#5735](https://github.com/DevExpress/testcafe/issues/5735)) * Fixed a multi-window mode bug that caused TestCafe to launch an empty browser window and then hang ([#6132](https://github.com/DevExpress/testcafe/issues/6132)) * Fixed a bug that denied users access to iframes with `srcdoc` attributes ([#6033](https://github.com/DevExpress/testcafe/issues/6033)) * Fixed a bug that interfered with the loading of Word Online documents in Firefox ([testcafe-hammerhead/#2287](https://github.com/DevExpress/testcafe-hammerhead/issues/2287)) ## v1.14.0 (2021-4-7) ## Enhancements ### ⚙ Scroll Actions ([PR #6066](https://github.com/DevExpress/testcafe/pull/6066)) When TestCafe interacts with elements on the page, it scrolls the page automatically to reach those elements. This release introduces actions that allow you to scroll webpage elements manually. * [t.scroll](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/scroll.html) - scrolls the element to a specified position * [t.scrollBy](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/scrollby.html) - scrolls the element by the specified number of pixels * [t.scrollIntoView](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/scrollintoview.html) - scrolls the element into view You can use the `t.scroll` action to scroll an element to a position: ```js import { Selector } from 'testcafe'; fixture`Scroll Action` .page('http://example.com'); test('Scroll the container', async t => { const container = Selector('#container'); await t .scroll(container, 'bottomRight') }); ``` `t.scrollBy` allows you to scroll an element (or the webpage) by a set amount of pixels. The example below scrolls the webpage 200px up and 500px to the right: ```js fixture`Scroll Action` .page('http://example.com'); test('Scroll the webpage', async t => { await t .scrollBy(500, -200) }); ``` Use `t.scrollIntoView` to scroll an element into view: ```js import { Selector } from 'testcafe'; fixture `Scroll Actions` .page `http://www.example.com/`; test('Scroll element into view', async t => { const target = Selector('#target') await t .scrollIntoView(target) }); ``` ## Bug Fixes * Fixed an error that caused [expect.contains](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/expect/contains.html) assertions to display `undefined` instead of a string value in diffs ([#5473](https://github.com/DevExpress/testcafe/issues/5473)) ## v1.13.0 (2021-03-22) This release adds support for custom paths to the configuration file, support for Microsoft Edge on Linux systems, and multiple bugfixes. ### Enhancements #### :gear: Specify Custom Path to the TestCafe Configuration File ([PR #6035](https://github.com/DevExpress/testcafe/pull/6035) by [@Chris-Greaves](https://github.com/Chris-Greaves)) TestCafe now allows you to specify a custom [configuration file](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html) path. To set this path, use one of the following options: * the [--config-file CLI flag](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--config-file-path) * the [configFile parameter of the createTestCafe function](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/global/createtestcafe.html#options) #### Add Support for Microsoft Edge on Linux ([PR testcafe-browser-tools/#210](https://github.com/DevExpress/testcafe-browser-tools/pull/210) by [@dcsaszar](https://github.com/dcsaszar)) If you follow the [Microsoft Edge Insider Channels for Linux](https://www.microsoftedgeinsider.com/en-us/download?platform=linux-deb) and have Microsoft Edge installed on your Linux machine, you can now launch TestCafe tests in this browser. ```sh testcafe edge tests/test.js ``` #### :gear: Deprecated the `t.setPageLoadTimeout` method ([PR #5979](https://github.com/DevExpress/testcafe/pull/5979)) Starting with v1.13.0, the [t.setPageLoadTimeout](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/setpageloadtimeout.html) method is deprecated. To set the page load timeout, use the new [test.timeouts](https://devexpress.github.io/testcafe/documentation/reference/test-api/test/timeouts.html) method. ```js fixture`Setting Timeouts` .page`http://devexpress.github.io/testcafe/example`; test .timeouts({ pageLoadTimeout: 2000 }) ('My test', async t => { //test actions }) ``` You can also use `test.timeouts` to set the [pageRequestTimeout](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#pagerequesttimeout) and [ajaxRequestTimeout](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#ajaxrequesttimeout). ```js fixture`Setting Timeouts` .page`http://devexpress.github.io/testcafe/example`; test .timeouts({ pageLoadTimeout: 2000, pageRequestTimeout: 60000, ajaxRequestTimeout: 60000 }) ('My test', async t => { //test actions }) ``` ### Bug Fixes * Fixed a bug where TestCafe would sometimes be unable to trigger a `hover` event on a `radio` element ([#5916](https://github.com/DevExpress/testcafe/issues/5916)) * Fixed a bug where TestCafe was unable to register a Service Worker due to the wrong `currentScope` calculation inside a `Window.postMessage` call ([testcafe-hammerhead/#2524](https://github.com/DevExpress/testcafe-hammerhead/issues/2524)) * `RequestLogger` now shows a correct protocol for WebSocket requests ([testcafe-hammerhead/#2591](https://github.com/DevExpress/testcafe-hammerhead/issues/2591)) * Test execution now pauses when the browser window is in the background ([testcafe-browser-tools/#158](https://github.com/DevExpress/testcafe-browser-tools/issues/158)) * TestCafe now appends an extension to screenshot filenames ([#5103](https://github.com/DevExpress/testcafe/issues/5103)) * Fixed a bug where TestCafe would emit test action events after the end of a test run ([#5650](https://github.com/DevExpress/testcafe/issues/5650)) * TestCafe now closes if the `No tests to run` error occurs in Live mode ([#4257](https://github.com/DevExpress/testcafe/issues/4257)) * Fixed a freeze that happened when you run a test suite with skipped tests ([#4967](https://github.com/DevExpress/testcafe/issues/4967)) * Fixed an error where a `documentElement.transform.translate` call moved the TestCafe UI in the browser window ([#5606](https://github.com/DevExpress/testcafe/issues/5606)) * TestCafe now emits a warning if you pass an unawaited selector to an assertion ([#5554](https://github.com/DevExpress/testcafe/issues/5554)) * Fixed a crash that sometimes occurred in Chrome v85 and earlier on pages with scripts ([PR testcafe-hammerhead/#2590](https://github.com/DevExpress/testcafe-hammerhead/pull/2590)) ## v1.12.0 (2021-03-03) ### Enhancements #### :gear: Server-Side Web Assets Caching ([testcafe-hammerhead/#863](https://github.com/DevExpress/testcafe-hammerhead/issues/863)) TestCafe's proxy server can now cache web assets (like images, scripts and videos). When TestCafe revisits a website, it loads assets from this cache to save time on repetetive network requests. To enable server-side caching, use any of the following: * [the `--cache` CLI flag](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--cache) * [the `cache` configuration file property](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#cache) * [the `createTestCafe` function parameter](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/global/createtestcafe.html) #### Initialize Request Hooks with Async Predicates The following request hooks now support **asynchronous** predicate functions: * [RequestHook](https://devexpress.github.io/testcafe/documentation/reference/test-api/requesthook/constructor.html#filter-with-a-predicate) * [RequestMock.onRequestTo](https://devexpress.github.io/testcafe/documentation/reference/test-api/requestmock/onrequestto.html#filter-with-a-predicate) * [RequestLogger](https://devexpress.github.io/testcafe/documentation/reference/test-api/requestlogger/constructor.html#filter-with-a-predicate) **Example** ```js const logger = RequestLogger(async request => { return await myAsyncFunction(); }); ``` ### Bug Fixes * Fixed a bug in Multiple Windows mode where TestCafe was sometime unable to switch to the main browser window ([#5930](https://github.com/DevExpress/testcafe/issues/5930)) * Fixed the `Illegal invocation` error thrown by TestCafe when calling `Storage.prototype` methods on a `StorageWrapper` object ([#2526](https://github.com/DevExpress/testcafe-hammerhead/issues/2526)) ## v1.11.0 (2021-03-02) ### Enhancements #### :gear: Set Request Timeouts ([PR #5692](https://github.com/DevExpress/testcafe/pull/5692)) TestCafe now enables you to set request timeouts. If TestCafe receives no response within the specified period, it throws an error. *CLI* * [--ajax-request-timeout](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--ajax-request-timeout-ms) controls the timeout for fetch/XHR requests * [--page-request-timeout](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--page-request-timeout-ms) sets the timeout for webpage requests ```sh testcafe chrome my-tests --ajax-request-timeout 40000 --page-request-timeout 8000 ``` *Configuration file* * [ajaxRequestTimeout](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#ajaxrequesttimeout) * [pageRequestTimeout](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#pagerequesttimeout) ```json { "pageRequestTimeout": 8000, "ajaxRequestTimeout": 40000 } ``` *JavaScript API* These options are available in the [runner.run Method](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/runner/run.html). ```js const createTestCafe = require('testcafe'); const testcafe = await createTestCafe('localhost', 1337, 1338); try { const runner = testcafe.createRunner(); const failed = await runner.run({ pageRequestTimeout: 8000, ajaxRequestTimeout: 40000 }); console.log('Tests failed: ' + failed); } finally { await testcafe.close(); } ``` #### :gear: Set Browser Initialization Timeout ([PR #5720](https://github.com/DevExpress/testcafe/pull/5720)) This release introduces an option to control browser initialization timeout. This timeout controls the time browsers have to connect to TestCafe before an error is thrown. You can control this timeout in one of the following ways: * [--browser-init-timeout](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--browser-init-timeout-ms) CLI option ```sh testcafe chrome my-tests --browser-init-timeout 180000 ``` * [browserInitTimeout](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#browserinittimeout) configuration option ```json { "browserInitTimeout": 180000 } ``` * [runner.run Method](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/runner/run.html) parameter ```js runner.run({ "browserInitTimeout": 180000 }) ``` This setting sets an equal timeout for local and [remote browsers](https://devexpress.github.io/testcafe/documentation/guides/concepts/browsers.html#browsers-on-remote-devices). #### Improved `Unable To Establish Browser Connection` Error Message ([PR #5720](https://github.com/DevExpress/testcafe/pull/5720)) TestCafe raises this error when at least one local or remote browser was not able to connect. The error message now includes the number of browsers that have not established a connection. TestCafe raises a warning if low system performance is causing the connectivity issue. #### :gear: An Option to Retry Requests for the Test Page ([PR #5738](https://github.com/DevExpress/testcafe/pull/5738)) If a tested webpage was not served after the first request, TestCafe can now retry the request. You can enable this functionality with a command line, API, or configuration file option: * the [--retry-test-pages](https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#--retry-test-pages) command line argument ```sh testcafe chrome test.js --retry-test-pages ``` * the [createTestCafe](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/global/createtestcafe.html) function parameter ```js const createTestCafe = require('testcafe'); const testcafe = await createTestCafe('localhost', 1337, 1338, retryTestPages) ``` * the [retryTestPages](https://devexpress.github.io/testcafe/documentation/using-testcafe/configuration-file.html#retrytestpages) configuration file property ```json { "retryTestPages": true } ``` ### Bug Fixes * Fixed a bug where `Selector.withText` couldn't locate elements inside an `iframe` ([#5886](https://github.com/DevExpress/testcafe/issues/5886)) * Fixed a bug where TestCafe was sometimes unable to detect when a browser instance closes ([#5857](https://github.com/DevExpress/testcafe/issues/5857)) * You can now install TestCafe with `Yarn 2` ([PR #5872](https://github.com/DevExpress/testcafe/pull/5872) by [@NiavlysB](https://github.com/NiavlysB)) * Fixed a bug where the `typeText` action does not always replace existing text ([PR #5942](https://github.com/DevExpress/testcafe/pull/5942) by [@rueyaa332266](https://github.com/rueyaa332266)) * Fixed a bug where TestCafe was sometimes unable to create a `Web Worker` from an object ([testcafe-hammerhead/#2512](https://github.com/DevExpress/testcafe-hammerhead/issues/2512)) * Fixed an error thrown by TestCafe proxy when trying to delete an object property that does not exist ([testcafe-hammerhead/#2504](https://github.com/DevExpress/testcafe-hammerhead/issues/2504)) * Fixed an error thrown by TestCafe proxy when a Service Worker overwrites properties of a `window` object ([testcafe-hammerhead/#2538](https://github.com/DevExpress/testcafe-hammerhead/issues/2538)) * Fixed a bug where `t.openWindow` method requested a URL twice ([testcafe-hammerhead/#2544](https://github.com/DevExpress/testcafe-hammerhead/issues/2544)) * Fixed an error (`TypeError: Illegal invocation`) thrown by TestCafe on pages that contain an XMLDocument with an `iframe` ([testcafe-hammerhead/#2554](https://github.com/DevExpress/testcafe-hammerhead/issues/2554)) * Fixed an error (`SyntaxError: Identifier has already been declared`) thrown by TestCafe on pages with scripts that create nested JavaScript objects ([testcafe-hammerhead/#2506](https://github.com/DevExpress/testcafe-hammerhead/issues/2506)) * Fixed a bug where TestCafe was unable to focus elements within shadow DOM ([testcafe-hammerhead/#2408](https://github.com/DevExpress/testcafe-hammerhead/issues/2408)) * TestCafe now throws an error when an entity of type other than `Error` is thrown in a test script ([PR testcafe-hammerhead/#2536](https://github.com/DevExpress/testcafe-hammerhead/pull/2536)) * Fixed a bug where TestCafe was sometimes unable to resolve relative URLs ([testcafe-hammerhead/#2399](https://github.com/DevExpress/testcafe-hammerhead/issues/2399)) * Properties of `window.location.constructor` are now shadowed correctly by TestCafe proxy ([testcafe-hammerhead/#2423](https://github.com/DevExpress/testcafe-hammerhead/issues/2423)) * TestCafe proxy now correctly handles requests that are not permitted by the CORS policy ([testcafe-hammerhead/#1263](https://github.com/DevExpress/testcafe-hammerhead/issues/1263)) * Improved compatibility with test pages that use `with` statements ([testcafe-hammerhead/#2434](https://github.com/DevExpress/testcafe-hammerhead/issues/2434)) * TestCafe proxy can now properly parse statements that use a comma operator in `for..of` loops ([testcafe-hammerhead/#2573](https://github.com/DevExpress/testcafe-hammerhead/issues/2573)) * Fixed a bug where TestCafe would open a new window even if `preventDefault` is present in element's event handler ([testcafe-hammerhead/#2582](https://github.com/DevExpress/testcafe-hammerhead/pull/2582)) ### Vulnerability Fix ([PR #5843](https://github.com/DevExpress/testcafe/pull/5843), [PR testcafe-hammerhead#2531](https://github.com/DevExpress/testcafe-hammerhead/pull/2531)) We have fixed a vulnerability found in the [debug](https://www.npmjs.com/package/debug) module we use for debugging. The vulnerability was a [ReDos Vulnerability Regression](https://github.com/visionmedia/debug/issues/797) that affected all TestCafe users. TestCafe now uses `debug@4.3.1`, where the issue is fixed. ## v1.10.1 (2020-12-24) ### Bug Fixes * Fixed an error thrown when TestCafe runs TypeScript tests ([#5808](https://github.com/DevExpress/testcafe/issues/5808)) * Implemented a Service Worker that allows TestCafe to re-try failed requests to the tested page. This improves test stability ([#5239](https://github.com/DevExpress/testcafe/issues/5239)) * Fixed an error thrown when you call the `t.getBrowserConsoleMessages` method ([#5600](https://github.com/DevExpress/testcafe/issues/5600)) ## v1.10.0 (2020-12-15) ### Enhancements #### Window Resize and Screenshot Support for Child Windows in Chrome ([PR #5661](https://github.com/DevExpress/testcafe/pull/5661), [PR #5567](https://github.com/DevExpress/testcafe/pull/5567)) You can now use the following actions in Google Chrome when you switch the test context to a [child window](https://devexpress.github.io/testcafe/documentation/guides/advanced-guides/multiple-browser-windows.html): * [t.maximizeWindow](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/maximize.html) * [t.resizeWindow](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/resizewindow.html) * [t.resizeWindowToFitDevice](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/resizewindowtofitdevice.html) * [t.takeElementScreenshot](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/takeelementscreenshot.html) * [t.takeScreenshot](https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/takescreenshot.html) #### New API to Specify Compiler Options ([#5519](https://github.com/DevExpress/testcafe/issues/5519)) In previous versions, you used the following methods to specify TypeScript compiler options: * the [--ts-config-path](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--ts-config-path-path) command line flag ```sh testcafe chrome my-tests --ts-config-path path/to/config.json ``` * the [runner.tsConfigPath](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/runner/tsconfigpath.html) method ```js runner.tsConfigPath('path/to/config.json'); ``` * the [tsConfigPath](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#tsconfigpath) configuration file property ```json { "tsConfigPath": "path/to/config.json" } ``` In v1.10.0, we introduced a new easy-to-use API that allows you to specify the compiler options in the command line, API or TestCafe configuration file, without creating a separate JSON file. The new API is also designed to accept options for more compilers (for instance, Babel) in future releases. The API consists of the following members: * the [--compiler-options](https://devexpress.github.io/testcafe/documentation/reference/command-line-interface.html#--compiler-options-options) command line flag ```sh testcafe chrome my-tests --compiler-options typescript.experimentalDecorators=true ``` * the [runner.compilerOptions](https://devexpress.github.io/testcafe/documentation/reference/testcafe-api/runner/compileroptions.html) method ```js runner.compilerOptions({ typescript: { experimentalDecorators: true } }); ``` * the [compilerOptions](https://devexpress.github.io/testcafe/documentation/reference/configuration-file.html#compileroptions) configuration file property ```json { "compilerOptions": { "typescript": { "experimentalDecorators": true } } } ``` If you prefer to keep compiler settings in a configuration file, you can use the new API to specify the path to this file: ```sh testcafe chrome my-tests --compiler-options typescript.configPath='path/to/config.json' ``` In v1.10.0, you can customize TypeScript compiler options only. For more information, see [TypeScript and CoffeeScript](https://devexpress.github.io/testcafe/documentation/guides/concepts/typescript-and-coffeescript.html). #### Added a Selector Method to Access Shadow DOM ([PR #5560](https://github.com/DevExpress/testcafe/pull/5560) by [@mostlyfabulous](https://github.com/mostlyfabulous)) This release introduces the [selector.shadowRoot](https://devexpress.github.io/testcafe/documentation/reference/test-api/selector/shadowroot.html) method that allows you to access and interact with the shadow DOM elements. This method returns a shadow DOM root hosted in the selector's matched element. ```js import { Selector } from 'testcafe' fixture `Target Shadow DOM elements` .page('https://devexpress.github.io/testcafe/example') test('Get text within shadow tree', async t => { const shadowRoot = Selector('div').withAttribute('id', 'shadow-host').shadowRoot(); const paragraph = shadowRoot.child('p'); await t.expect(paragraph.textContent).eql('This paragraph is in the shadow tree'); }); ``` Note that you should chain other [selector methods](https://devexpress.github.io/testcafe/documentation/guides/basic-guides/select-page-elements.html#member-tables) to [selector.shadowRoot](https://devexpress.github.io/testcafe/documentation/reference/test-api/selector/shadowroot.html) to access elements in the shadow DOM. You cannot interact with the root element (an error occurs if you specify `selector.shadowRoot` as an action's target element). ### Bug Fixes * Browsers now restart correctly on BrowserStack when the connection is lost ([#5238](https://github.com/DevExpress/testcafe/issues/5238)) * Fixed an error that occurs if a child window is opened in an `iframe` ([#5033](https://github.com/DevExpress/testcafe/issues/5033)) * TestCafe can now switch between the child and parent windows after the parent window is reloaded ([#5463](https://github.com/DevExpress/testcafe/issues/5463), [#5597](https://github.com/DevExpress/testcafe/issues/5597)) * Fixed an issue when touch and mouse events fired on mobile devices even though the mouse event was prevented in page code ([#5380](https://github.com/DevExpress/testcafe/issues/5380)) * Cross-domain `iframes` are now focused correctly in Safari ([#4793](https://github.com/DevExpress/testcafe/issues/4793)) * Fixed an excessive warning displayed when an assertion is executed in a loop or against an element returned by a `selector.xxxSibling` method ([#5449](https://github.com/DevExpress/testcafe/issues/5449), [#5389](https://github.com/DevExpress/testcafe/issues/5389)) * A page error is no longer emitted if the destination server responded with the `304` status ([#5025](https://github.com/DevExpress/testcafe/issues/5025)) * Fixed an issue when TestCafe could not authenticate websites that use MSAL ([#4834](https://github.com/DevExpress/testcafe/issues/4834)) * The `srcdoc` attributes for `iframes` are now processed ([testcafe-hammerhead/#1237](https://github.com/DevExpress/testcafe-hammerhead/issues/1237)) * The `authorization` header is now preserved in response headers of fetch requests ([testcafe-hammerhead/#2334](https://github.com/DevExpress/testcafe-hammerhead/issues/2334)) * The `document.title` for an `iframe` without `src` can now be correctly obtained in Firefox ([PR testcafe-hammerhead/#2466](https://github.com/DevExpress/testcafe-hammerhead/pull/2466)) * TestCafe UI is now displayed correctly if the tested page's body content is added dynamically ([PR testcafe-hammerhead/#2454](https://github.com/DevExpress/testcafe-hammerhead/pull/2454)) * Service Workers now receive `fetch` events ([testcafe-hammerhead/#2412](https://github.com/DevExpress/testcafe-hammerhead/issues/2412)) * Fixed the case of headers sent to the web app server ([testcafe-hammerhead/#2344](https://github.com/DevExpress/testcafe-hammerhead/issues/2344)) * `Location` objects in `iframes` without `src` now contain the correct data ([PR testcafe-hammerhead/#2448](https://github.com/DevExpress/testcafe-hammerhead/pull/2448)) * Native function wrappers are now converted to strings correctly ([testcafe-hammerhead/#2394](https://github.com/DevExpress/testcafe-hammerhead/issues/2394)) * Values retrieved from the local storage are now converted to strings ([testcafe-hammerhead/#2313](https://github.com/DevExpress/testcafe-hammerhead/issues/2313)) * Fixed an issue when relative URLs were resolved incorrectly in `iframes` ([testcafe-hammerhead/#2461](https://github.com/DevExpress/testcafe-hammerhead/issues/2461)) * Fixed an issue when TestCafe took a very long time to process large CSS files ([testcafe-hammerhead/#2475](https://github.com/DevExpress/testcafe-hammerhead/issues/2475)) * Fixed an issue with client-side JavaScript processing ([testcafe-hammerhead/#2442](https://github.com/DevExpress/testcafe-hammerhead/issues/2442)) * Fixed an issue that suppressed Adobe Launch Analytics requests ([testcafe-hammerhead/#2453](https://github.com/DevExpress/testcafe-hammerhead/issues/2453)) * Added support for Web Workers created from Blob URLs ([testcafe-hammerhead/#1221](https://github.com/DevExpress/testcafe-hammerhead/issues/1221)) * Fixed an issue when network requests were not received by the server ([testcafe-hammerhead/#2467](https://github.com/DevExpress/testcafe-hammerhead/issues/2467)) * Cross-domain `iframe` source links now have the correct protocol when SSL is used ([PR testcafe-hammerhead/#2478](https://github.com/DevExpress/testcafe-hammerhead/pull/2478)) ## v1.9.4 (2020-10-2) ### Bug Fixes * Fixed an error thrown when TestCafe tested pages that access `document.title` ([#5559](https://github.com/DevExpress/testcafe/issues/5559), [PR testcafe-hammerhead/#2451](https://github.com/DevExpress/testcafe-hammerhead/pull/2451), [PR testcafe-hammerhead/#2446](https://github.com/DevExpress/testcafe-hammerhead/pull/2446)) * Fixed a crash occurred when `null` was passed to the `createTestCafe()` API function ([#5549](https://github.com/DevExpress/testcafe/issues/5549)) * Fixed an error thrown when the `content-encoding` header value was in the upper case ([testcafe-hammerhead/#2427](https://github.com/DevExpress/testcafe-hammerhead/issues/2427)) * Fixed a crash that occurred in IE11 when Web Workers were used ([PR testcafe-hammerhead/#2441](https://github.com/DevExpress/testcafe-hammerhead/pull/2441) by [@danielroe](https://github.com/danielroe)) * HTML nodes are now ordered correctly on tested web pages with Shadow UI ([PR testcafe-hammerhead/#2447](https://github.com/DevExpress/testcafe-hammerhead/pull/2447)) ## v1.9.3 (2020-9-17) ### Bug Fixes * Fixed the `RequestMock` type definitions to accept any type for the headers ([#5529](https://github.com/DevExpress/testcafe/issues/5529)) * TestCafe no longer displays a warning about missing `await` when you save a snapshot property to a variable but do not use it later in the test ([#5534](https://github.com/DevExpress/testcafe/issues/5534)) * Consecutive `document.getElementsByTagName('body')` calls now produce the correct results even if the first call was made before a document body was parsed entirely ([#5322](https://github.com/DevExpress/testcafe/issues/5322)) ## v1.9.2 (2020-9-2) ### Bug Fixes * TestCafe's TypeScript definitions now allow `null` as an expected value in assertions ([PR #5456](https://github.com/DevExpress/testcafe/pull/5456)) * Added warnings displayed when a user tries to get a snapshot property value and misses `await` ([PR #5383](https://github.com/DevExpress/testcafe/pull/5383), part of [#5087](https://github.com/DevExpress/testcafe/issues/5087)) * Tested app's standard output and error streams are forwarded to the TestCafe's debug log now ([#5423](https://github.com/DevExpress/testcafe/issues/5423)) * Tested apps no longer cause buffer overflow errors when they output too much data to standard streams ([#2857](https://github.com/DevExpress/testcafe/issues/2857)) * TestCafe now correctly waits for elements on tested pages that mock date functions ([#5447](https://github.com/DevExpress/testcafe/issues/5447)) * HTTP header overflow errors now occur less frequently due to the increased maximum header size. Enhanced the error message with troubleshooting instructions ([testcafe-hammerhead/#2356](https://github.com/DevExpress/testcafe-hammerhead/issues/2356)) * Added a descriptive message with troubleshooting instructions for the error thrown when the tested web server sends malformed or non-standard headers ([testcafe-hammerhead/#2188](https://github.com/DevExpress/testcafe-hammerhead/issues/2188)) * Fixed a CSRF error on tested pages that use the `Request` class ([testcafe-hammerhead/#2140](https://github.com/DevExpress/testcafe-hammerhead/issues/2140)) * `t.hover` now works correctly for tested pages built with the Styled Components framework ([#3830](https://github.com/DevExpress/testcafe/issues/3830)) * Fixed script processing that could cause unhandled exceptions on some pages ([testcafe-hammerhead/#2417](https://github.com/DevExpress/testcafe-hammerhead/issues/2417)) * Fixed the 'TypeError: r is not a function' uncaught exception on some pages with an `