You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we can only use cy.readFile() to check the file downloaded to the download folder. But with out downloading can we intercept and find out whether the link is providing a valid download file or not ?
a. User clicks on a link or button to open a file link.
b. Since browser is configured to download to downloads folder, it gets downloaded automatically.
c. We can use cy.readFile() to check the file size to verify whether it has been downloaded correctly or not.
d. Instead, we just need to check the file will be downloaded or not and assert by intercepting the file download in the network layer itself.
@brian-mann has suggested to some one to open a issue, but not sure whether it has been open or not. And whether it got implemented or not?
Versions
Cypress 3.4.1
Windows 10 enterprise, Chrome v76
The text was updated successfully, but these errors were encountered:
You can now test file downloads in Cypress without the download prompt displaying. Any files downloaded while testing file downloads will be stored in the downloadsFolder which is set to cypress/downloads by default. The downloadsFolder will be deleted before each run unless trashAssetsBeforeRuns is set to false.
This means that if you had any code written to prevent the download prompt or to configure the download location (like in a before:browser:launch event handler), you can remove all of these workarounds.
Our file download recipe has been updated, so you can see some ways to test different types of files after they've been downloaded there.
If you're encountering any bugs while testing file downloads, please open a new issue.
@jennifer-shehane is there documentation anywhere on how to handle the download prompt? need to figure out how to press the save/cancel button on the download prompt dialog
Currently we can only use
cy.readFile()
to check the file downloaded to the download folder. But with out downloading can we intercept and find out whether the link is providing a valid download file or not ?a. User clicks on a link or button to open a file link.
b. Since browser is configured to download to downloads folder, it gets downloaded automatically.
c. We can use
cy.readFile()
to check the file size to verify whether it has been downloaded correctly or not.d. Instead, we just need to check the file will be downloaded or not and assert by intercepting the file download in the network layer itself.
@brian-mann has suggested to some one to open a issue, but not sure whether it has been open or not. And whether it got implemented or not?
Versions
Cypress 3.4.1
Windows 10 enterprise, Chrome v76
The text was updated successfully, but these errors were encountered: