Might be worth trying Mechanize to bypass the nasty UI:
http://rubyforge.org/projects/mechanize/
-C

On 5/21/07, Erik Oliver <[EMAIL PROTECTED]> wrote:
> A web page I'm trying to automate with Watir works as follows: Visible
> to user is a link to a javascript (JS1), JS1 in turn sets a bunch of
> hidden form values AND the action URL of the form, JS1 then calls
> submit on the form.
>
> Purpose of using Watir is to automate a repetitive task (download of
> multiple XML files from the website).
>
> **STRATEGY 1***
>
> Use the straightforward ie.link(:text, [text of link]) to cause JS1 to
> invoke. That causes IE7 to pop up one of those nasty download warnings
> and the script gets hung up.
>
> Any suggestions for bypassing this?
>
> **STRATEGY 2**
>
> I tried to simulate the JS itself since what I'm trying to do is
> automate a repetitive form task and batch download files, I generated
> the following basic code:
>
> form = ie.form(:name, 'appsByCustomer')
> form.hidden(:name,'isSubmitted').value = 'isSubmitted'
> form.hidden(:name,'paramForXmlDownload').value = 'forMultipleDownloads'
> form.hidden(:name,'dosnum').value = 'null'
> ### problem is how do I set form.action, the obvious form.action =
> 'url string' doesn't work?
> form.submit
>
> Suggestions for how to set the action attribute?
>
> Regards,
> Erik
>
> PS: The page basically has about 5 different Javascripts wrapping the
> same form, the html has <form name="appsByCustomer" action="" etc>,
> each of the javascripts sets the action to a different value.
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to