June 2021 - Digital Tool Factory blog June 2021 - Digital Tool Factory blog

The Digital Tool Factory Blog

Dynamic page redirects in TestCafe

So – you need to redirect to a dynamic page in TestCafe you say? Try the below

const setValue = ClientFunction(() => {
var idToUseForRedirection=document.querySelector(‘input[name=”ID”]’).value;
document.location.href=”https://someurl.com?id=” + idToUseForRedirection;


await setValue();

Jun 21

Written By Steve French


Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.