In my last post I discussed about WATIR integration with Rspec.

In our project, we had excel report download component. The challenge with Watir was to be able to download the excel file, save it and validate data against DB. Thanks to David Brown for his Excel Interface class library which is easy to implement. Next thing was to be able to save the file at any given location (always). None of the documented steps worked. The autoit dll supported by Watir was at the rescue. Au3Info.exe helps to identify IE control IDs. The following code snippet explains the rest:

file_download

After conquering file download, next was file upload. It was much easier coz Au3Info.exe was always their to figure IE control IDs. Using AutoIt documentation simplified it further.

file_upload
WATIR rocks !!