I need to download a pdf file with Selenium. This pdf file is downloaded when a button is clicked. The URL of the file isn't accesible, the button submit a form and the server response directly with the file (without confirm dialog).
I'm using PhantomJS WebDriver (the project is in C#) because the application will be an Azure webapp, so I can't use ChromeDriver or similar. The problem is that PhantomJS can't deal with binary files, so when I simulate the click in the button the app doesn't download anything.
Any ideas??
P.D: Selenium is not only for the pdf download, the project do a lot of scrapping with it.
JavascriptExceutor
to clcik that button element – Kushal Bhalaik