Dynamic page redirects in TestCafe - Digital Tool Factory blog Dynamic page redirects in TestCafe - 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();

 

Written By Steve French

 

Leave a Reply

Your email address will not be published. Required fields are marked *






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