I am using Testcafe to test my application. I have a page on which there is a button. When I click the button the page redirects to another page which contains a bunch of images and where a server call happens. Then when the call has been resolved, the page redirects again to another page.
I am trying to test this middle page which shows only for a few seconds.
I want to test that the URL was changed when Page A went to Page B. I want to test that the page was shown and images were shown.
The problem is that when I automate click on the button on Page A, it goes to Page B and then after a few seconds it goes to Page C and then the test executes and just hangs.
I have tried setting the
await t.setPageLoadTimeout(0)
.wait(200000)
.eval(() => window.location.pathname)
.expect(window.location.pathname)
.contains('/gatheringDetails', 'The response was ok', {timeout: 500});
So, I can control the page load timeout to help catch the middle page but it doesn't work.
Can someone help? Please.
Aucun commentaire:
Enregistrer un commentaire