The problem with save as dialogs is that they are a part of the operating
system,  not the browser. What you can do is set the browser profile to not
check with the os when downloading.

Using profiles with watir -
http://watirwebdriver.com/firefox/
http://watirwebdriver.com/chrome/

Titus
On Jan 5, 2015 2:53 AM, "Dan Sharp" <[email protected]> wrote:

> Hi!
>
> I'm new to Watir... working on a script to automate some browser screen
> scraping.
>
> One page in particular has this problem that I'm stuck on:  the page has a
> link that is a javascript link, and the result of the javascript is that it
> generates/sends a PDF to be downloaded/saved.  So when I use Watir to click
> the link, I get the Save As dialog, but I have no idea how to make it
> actually click the "OK" button in the Save As dialog. It's not a javascript
> window, so the usual javascript dialog/alert methods don't work.  Also, as
> the link is not a direct link to the PDF, I can't right-click on it to save
> it without the dialog.
>
> I tried looking through the source to see if the URL was just hidden, but
> it's not... it appears to be generated via some convoluted javascript.
>
> So I'm stuck. I can manually click the link and get the Save As dialog and
> manually click the "OK" button (I'm on a mac, using Firefox, if the
> matters).  But I can't automate it.
>
> Any help?
>
> Thanks!
>
> -Dan
>
> --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to