Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle File download dialog/popup in IE browser USING SELENIUM and C#

I have page which downloads a file which shows a dialog on the bottom with OPEN SAVE CANCEL options, how can I click those options ? I am using IE browser, I saw some solutions using third party AutoIt, Robot class, but I am looking with Selenium and C# only. Attached is the image of what I am talking.. Any idea how can we do this ?enter image description here

like image 256
msbyuva Avatar asked Jul 31 '15 19:07

msbyuva


People also ask

How do I automatically download files from a pop up dialog using Selenium Python?

New Selenium IDE We can automatically download files from a pop up dialog using Selenium webdriver with Python. After clicking the download link, a dialog box appears for the user to select various options to Save the file.

How do I download a pop up file?

Find the pop-up you want to download and click on More (three dots icon) (1) and Download (2). 2. In the new window, click on Download . popup file to confirm the export.


1 Answers

 AutoItX3 autoit = new AutoItX3();
                autoit.WinActivate("Save");            
                Thread.Sleep(1000);
                autoit.Send("{F6}");
                Thread.Sleep(1000);
                autoit.Send("{TAB}");
                Thread.Sleep(1000);
                autoit.Send("{ENTER}");
like image 186
Raluca Avatar answered Oct 16 '22 07:10

Raluca