How I can reload the current page with testcafe? I found
.eval(() => location.reload(true))
But it looks like an old code, current TestCafe do not understand this. (No function error)
It's the correct way to reload the tested page. See a full test example:
import { Selector } from 'testcafe';
fixture `New Fixture`
.page ('https://devexpress.github.io/testcafe/example/');
test('New Test', async t => {
await t.typeText('#developer-name', 'Peter Parker');
await t.eval(() => location.reload(true));
await t
.wait(3000)
.expect(Selector('#developer-name').value).eql('');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With