You can write TestCafe tests using the latest JavaScript features like async/await.
Test API consists of over two dozen methods that can emulate all actions one could possibly do with a webpage. Chained syntax allows for code that is easy to write and read.
fixture `Example page`
.page `https://devexpress.github.io/testcafe/example`;
test('Emulate user actions and perform a verification', async t => {
await t
.setNativeDialogHandler(() => true)
.click('#populate')
.click('#submit-button');
const location = await t.eval(() => window.location);
await t.expect(location.pathname).eql('/testcafe/example/thank-you.html');
});
Additionally, TestCafe automatically generates source maps for easy debugging. To debug your test code, start a debugging session in an IDE that supports source maps.