Test.disablePageCaching Method

Disables page caching for a particular test.

You may inadvertently navigate to a cached page that contains outdated automation scripts: for example, when you activate a Role. This can lead to TestCafe errors. Use the Test.disablePageCaching method to disable page caching.

See Troubleshooting: Test Actions Fail After Authentication for more information.

test.disablePageCaching → this

Example

test
    .disablePageCaching
    ('My test', async t => { /* ... */ });

You can also disable page caching during all tests in a fixture with the fixture.disablePageCaching method.