# Need to download a file and then have to verify the contents

**URL:** <https://www.ruby-forum.com/t/need-to-download-a-file-and-then-have-to-verify-the-contents/155594>\
**Category:** Ruby\
**Created:** [December 14, 2008, 5:55am UTC](https://www.ruby-forum.com/t/need-to-download-a-file-and-then-have-to-verify-the-contents/155594 "2008-12-14T05:55:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [December 14, 2008, 5:55am UTC](https://www.ruby-forum.com/t/need-to-download-a-file-and-then-have-to-verify-the-contents/155594/1 "2008-12-14T05:55:49Z")

</div>

Hi,

I have an application [web page], where i have an option to download  
files once selected.

Once file is selected, we can click on download button. Till here im  
able to do using watir.

But im not able to render through this download dialog using watir.

I need to give location in this Download dialog and then have to save  
the file.

Once file is saved at particular location, i need to open/ verify the  
contents of that file.

All this i need to do using watir.

Can anybody help me in this regard, how can i do this using watir.

I have AutoIt installed on my machine.

Bhavesh

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [December 15, 2008, 7:54am UTC](https://www.ruby-forum.com/t/need-to-download-a-file-and-then-have-to-verify-the-contents/155594/2 "2008-12-15T07:54:45Z")

</div>

Hi,  
you could break this in to several parts.

First, check if you can click a download button with _watir_.

Second, check if you can download a file, download a file with `wget <your options>`.

Third, check the contents of your downloaded file.

Bhavesh S. wrote:

> Hi,
> 
> I have an application [web page], where i have an option to download  
> files once selected.
> 
> Once file is selected, we can click on download button. Till here im  
> able to do using watir.
> 
> But im not able to render through this download dialog using watir.
> 
> I need to give location in this Download dialog and then have to save  
> the file.
> 
> Once file is saved at particular location, i need to open/ verify the  
> contents of that file.
> 
> All this i need to do using watir.
> 
> Can anybody help me in this regard, how can i do this using watir.
> 
> I have AutoIt installed on my machine.
> 
> Bhavesh

---

<div class="post-metadata">

**Author:** ![bhavesh1\_sharma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Post date:** [December 15, 2008, 12:28pm UTC](https://www.ruby-forum.com/t/need-to-download-a-file-and-then-have-to-verify-the-contents/155594/3 "2008-12-15T12:28:54Z")

</div>

Hi Marius,

Thanks for the information.

But from where i get these routines “_watir_” and “wget”

Also i need to automate the opening and verification of the contents of  
the files through watir itself.

Can you help me in this?

Thanks  
Bhavesh

Marius Å½ilÄ—nas wrote:

> Hi,  
> you could break this in to several parts.
> 
> First, check if you can click a download button with _watir_.
> 
> Second, check if you can download a file, download a file with `wget <your options>`.
> 
> Third, check the contents of your downloaded file.
> 
> Bhavesh S. wrote:
> 
> > Hi,
> > 
> > I have an application [web page], where i have an option to download  
> > files once selected.
> > 
> > Once file is selected, we can click on download button. Till here im  
> > able to do using watir.
> > 
> > But im not able to render through this download dialog using watir.
> > 
> > I need to give location in this Download dialog and then have to save  
> > the file.
> > 
> > Once file is saved at particular location, i need to open/ verify the  
> > contents of that file.
> > 
> > All this i need to do using watir.
> > 
> > Can anybody help me in this regard, how can i do this using watir.
> > 
> > I have AutoIt installed on my machine.
> > 
> > Bhavesh
