TestCafe allows you to execute custom code on tested pages. This code can use the DOM or browser API to obtain data or manipulate the page state.
Test Code: reload-page.js
If you are testing a page that does not update automatically when server-side changes occur, you may need to reload it in code to reflect these changes.
This example uses the t.eval method to execute Location.reload in the browser.