rom
rom

Reputation: 664

TestCafe Click Spawned Pop Up to Save CSV File

I can't find any way to click "Save" on a pop up that spawns during a test. TestCafe needs to click the "Save" button so I can obtain the CSV file.

I've tried searching for a way to do this in the docs but the closest thing I found so far is .pressKey('enter'). However, this fails to click 'Save' and I don't know what other options I have.

Screenshot of exactly what I'm trying to click:

enter image description here

I provided the end of my code (you'll have to assume all the prior parts of a TestCafe test are preceeding this:

.click(export_button)
.click(csv_pill)
.wait(3000)
.pressKey('enter')

I expect to somehow be able to have the mouse detect this 'Save' button and it clicks it to save this CSV file.

Upvotes: 1

Views: 401

Answers (1)

Artem
Artem

Reputation: 921

TestCafe cannot test native browser dialogs. They should be prevented. If you encountered this behavior during the test, please create a bug report with a simple example page or link to a tested site.

Upvotes: 3

Related Questions