0

We're building an analytics portal, and needless to say, a top feature is the ability to export statistics to excel. My question is - Does Selenium provide the ability to detect the generation of Excel files (upon clicking the icon within the portal)? At this stage, just the presence (or absence) suffices. I don't need to delve into the excel file contents (yet).

More information - Here is a screenshot of the excel file that is generated...

enter image description here

This notification seems outside Selenium's purview

rs79
  • 2,311
  • 2
  • 33
  • 39
  • 2
    How about selecting "Save File" and checking that box "Do this automatically for files like this from now on". Once you do this for the FF profile you are using for the test, your files will be downloaded automatically during the execution. Then you can use java to check whether such a file exists in the specified path. – A.J May 25 '11 at 04:09
  • 2
    You can use _[AutoIt](http://www.autoitscript.com/site/autoit/)_ to handle this dialog box. – Vaman Kulkarni May 25 '11 at 05:54

1 Answers1

1

The file download dialogs are part of the Windows Component Object Model (COM) and not the Browser, thus selenium won't be able to work with it. One of the best ways to handle it with a tool that can interact with the COM, such as AutoIt (mentioned in a comment above).

See this answer that contains example script to do what you want: how to handle IE Download dialog with VB Script? but instead of invoking AutoIt from VBScript you would invoke it with the code running selenium (but it will have to be on the local machine).

Community
  • 1
  • 1
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103