TestCafe

TestCafe is a node.js tool to automate end-to-end web testing with tests written in JS or TypeScript, run them and view results. TestCafe runs on Windows, MacOS, and Linux and takes 1 minute to set up.

Table of Contents

This is referring to the end-to-end testing tool at https://devexpress.github.io/testcafe

Increase page load timeout for slow loading page

The default is just 3 seconds - which is often insufficient when testing against local/staging environments where the assets are not optimized, plus TestCafe is requesting the page afresh on every load.

testcafe chrome tests --page-load-timeout 30000 --selector-timeout 10000 --assertion-timeout 10000

Workaround for DOMException error on clicking button

There are instances that await t.click(Selector('button')) will result in an odd DOMException error, where it's not replicable outside the test run.

Following this thread there's a workaround:

testcafe chrome tests --skip-js-errors