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

Download file native dialog @ firefox #2741

Closed
prototype23 opened this issue Aug 16, 2018 · 4 comments
Closed

Download file native dialog @ firefox #2741

prototype23 opened this issue Aug 16, 2018 · 4 comments
Assignees
Labels
AREA: client FREQUENCY: level 2 STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@prototype23
Copy link

prototype23 commented Aug 16, 2018

Are you requesting a feature or reporting a bug?

Not sure. Maybe firefox behaves like that for security reasons.

What is the current behavior?

While on Chrome and Chrome headless 68.0.3440 the file is downloaded without any native dialog, on firefox a dialog appears and prompts for user input.

This is not a blocker since the test does not fail after that. But if you want to assert the download, test will fail because file is not automatically downloaded.

...
const downloadAssetLogger = RequestLogger(/download\/asset.php/, {
  logResponseBody: true,
  logResponseHeaders: true
});
...
// ==================
// Test custom assets - file
// ===================
  await t
    .click(page.microsite.assets.custom.file)
    .expect(downloadAssetLogger.contains(record => record.response.statusCode === 302)).ok()
    .expect(downloadAssetLogger.requests[0].response.headers.location).contains('.zip');

What is the expected behavior?

On tests, no native dialogs should pop up when an action is downloading a file.

How would you reproduce the current behavior (if this is a bug)?

Create a test like the example above and run it on a windows 10 machine with Firefox 61.0.0 or Firefox 61.0.2.

Specify your

  • operating system: Windows 10
  • testcafe version: 0.21.1
  • node.js version: 9.3.0

Question

Can this native dialog handled by the setNativeDialogHandler? Thank you.

@IegorZabielin-KSO
Copy link

IegorZabielin-KSO commented Aug 18, 2018

+1

We tried to update firefox profile and disable alert appearing right before tests execution. It was working for some time, but i assume after FF updating this problem started to reproduce again.

@AndreyBelym AndreyBelym added TYPE: enhancement The accepted proposal for future implementation. AREA: client SYSTEM: automations labels Aug 18, 2018
@prototype23
Copy link
Author

It seems the same happens for ie11
image

@dlangerenken
Copy link

@AndreyBelym is there a way to force the download in firefox, e.g. automatically accepting the dialog?

@AndreyBelym AndreyBelym added this to the Sprint #38 milestone Jul 18, 2019
@AndreyBelym AndreyBelym added TYPE: bug The described behavior is considered as wrong (bug). and removed TYPE: enhancement The accepted proposal for future implementation. labels Jul 18, 2019
@kirovboris kirovboris modified the milestones: Sprint #38, Sprint #39 Aug 13, 2019
@AndreyBelym AndreyBelym modified the milestones: Sprint #39, Sprint #40 Aug 28, 2019
@AndreyBelym AndreyBelym modified the milestones: Sprint #40, Sprint #41 Sep 10, 2019
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Sep 20, 2019
@AlexKamaev AlexKamaev self-assigned this Sep 20, 2019
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Sep 20, 2019
@lock
Copy link

lock bot commented Oct 3, 2019

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.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Oct 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
* [WIP]enable file downloading in FF (closes DevExpress#2741)

* merge similar tests in one file

* pdf in chrome
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: client FREQUENCY: level 2 STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

6 participants