paul.rogers
5/3/2006 8:17:00 PM
Chris, I cant get my web email to work, so couldnt reply to your
message on the watir list
Watir has a thing called an error checker, look at the watir source for
the HTTP_Checker ( I think thats what ts called).
The checker gets run on every page load, normally you would use it to
see if something you expect on every page ( like a logo ) is there.
You may be able to write one that appends the auth string to the end of
gets and puts
Paul
Chris McMahon wrote:
> Hi...
>
> After googling for lots of Win32OLE goodies, I've hacked the Watir
> goto() method to pass Basic Authentication credentials:
>
> def goto(url)
> #@ie.navigate(url)
> @ie.navigate(url,nil,nil,nil,"Authorization: Basic
> AbdXyz46bG1ubw==\n")
> wait()
> sleep 0.2
> return @down_load_time
> end
>
> and it works!!
>
> The only problem is that it works only for the very first transaction.
> I'm now getting authorization popups for inline images and things on
> the very first page.
>
> Under normal circumstances, the browser, having passed basic
> authentication credentials once to this site would know to *always*
> pass
> those credentials to that site for every subsequent GET/POST/whatever.
>
> But that doesn't seem to be the case when I navigate() to the site from
> within Watir's goto() method.
>
> Any suggestions for persuading IE-controlled-by-Watir to always pass
> auth credentials for every GET/POST would be welcome.