Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Cypress headless mode download.htm file is created #125

Open
tea8923 opened this issue Jul 27, 2023 · 1 comment
Open

In Cypress headless mode download.htm file is created #125

tea8923 opened this issue Jul 27, 2023 · 1 comment

Comments

@tea8923
Copy link

tea8923 commented Jul 27, 2023

When starting the tests in a Cypress headless mode, .crdownload is not appended to the downloaded file and removed when the file is downloaded completely, instead the completely new file is being created inside cypress/downloads folder with the name downloads.htm.crdownload ('downloads.htm'). So at the end of testing there are 2 files:

valid_file.txt
download.htm

Why is it happening?

CY v12.17.0
cy-verify-downloads v0.1.15

Thank you in advance.

@oselow
Copy link

oselow commented Oct 23, 2023

I had the same problem and it's because the file is still downloading. I solved the problem by adding a cy.wait after the download action (click or get url). For example, you add 10 seconds to make sure it's finished (then maybe you can intercept it).

Hope it's help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants