-
Notifications
You must be signed in to change notification settings - Fork 674
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
Download file works in chromium but fails with chromium:headless (linux) #3127
Comments
My full code is at https://github.com/TauPan/Tageblatt-Downloader however the download would only work with my login data. I assume that the problem can be reproduced with any site offering a download. |
Sorry for the delay. I researched the issue and found that downloading in headless mode could be implemented via Chrome Debug Protocol. Please refer to the following links to get started: I've prepared the following workaround:
This test navigates to the TestCafe repository and downloads the .zip archive. You should use the following command to start the test: We will consider integrating this feature to TestCafe. |
While this works great for chrome:headless - is there anything similar for firefox:headless? @AlexKamaev |
Quick note (see #3600 for more information): If you specify the cdpPort manually, you should not run in concurrent-mode since this will lead to errors. So while this workaround allows you to download files, it will not allow you to run concurrently |
I've modified my example a little. Now it will allow you to use the concurrency option. Please refer to https://gist.github.com/AlexKamaev/8c1eb8a5fb638fa366b44447f6d7c5a4 |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
What is your Test Scenario?
Downloading a file from a website (any, really) to
${process.env.HOME}/Downloads
and checking the contents.What is the Current behavior?
Download works with chromium gui on linux, but fails with chromium:headless. Screenshot after clicking the download link show just the download page but no statusbar with download in progress. The loop waiting for the file to be complete takes forever, there is no file in
${process.env.HOME}/Downloads
.What is the Expected behavior?
File is downloaded. Additionally, I'd expect tests to behave identically in headles or GUI mode.
What is your web application and your TestCafe test code?
My full code is at https://github.com/TauPan/Tageblatt-Downloader however the download would only work with my login data. I assume that the problem can be reproduced with any site offering a download.
Steps to Reproduce:
Your Environment details:
Maybe it can be fixed with a configuration.
The text was updated successfully, but these errors were encountered: