I'm testing a web app with Selenium and I actually need to download a txt file during my test. But this seems impossible because a pop up appears asking to save the file. So, this blocks the progress of the test. Some have advised me to use Wget, but I don't know how to use this tool. Could you please help out for this?

• Are you trying to test that you can successfully download this file from the site? Or does the txt file have information in it you need for your tests and you just need some way to download it within them? Apr 12 '14 at 6:29
• No, I'm just trying to download the file from the web app I'm testing with Selenium. This works manually but not with Selenium because of this problem blog.codecentric.de/en/2010/07/… That's why I want to use WGet to solve my problem. Apr 14 '14 at 11:36
• The reason I ask is that using WGet won't necessarily test that the link from your website is correct. My preferred solution is to change the browser settings to do silent downloads and not have a dialog displayed. Apr 14 '14 at 15:56
• Is this possible ? How can we not to have the dialog displayed ? I'm using firefox and IE Apr 15 '14 at 8:24
• Example for firefox: elementalselenium.com/tips/2-download-a-file Unfortunately, in IE, there is no way to remove the dialog completely. Apr 15 '14 at 16:28

Basically you want to execute the command wget http:\\www.yourwebsitehere.com\file\todownload.txt -O c:\directory\tosave\file.txt using the shell.
You could also do two commands: cd c:\directory\tosave\file.txt followed by wget http:\\www.yourwebsitehere.com\file\todownload.txt