https://cypress.io logo
Hi @hereI have a test that is clicking a button to...
# general-chat
i
Hi @hereI have a test that is clicking a button to download a file, however the way it gets the file is through a URL. Because of this behavior Cypress assumes a new page is being loaded when you click the button and therefore my test fails because it’s waiting for a page to load which will never happen. I have tried asking around my project and have tried googling but I haven’t been able to find anything useful, can anyone help in that regard please?
w
Hard to say for sure without seeing the example of the code in question, and the test you are writing with exactly what you want to assert. > the way it gets the file is through a URL This could mean a lot of different things. It might be possible for you to check the URL itself and confirm it's what you expect, without clicking it? Depends on the goals of your test.
i
Many thanks I figure out my problem by providing some wait