What I
will do with for any exception is look at the returned text for an
error message. That sounds like the easy way.
Also I
wonder is there a Ruby HTTP client library? Something like Perl's LWP? That
way, when get an exception, I would do an HTTP request
using
the last URL.
Cheers
and thanks for all the help you guys are great
Pierre
-----Original Message-----
From: Jeff Wood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 25, 2005 2:29 AM
To: [email protected]
Subject: Re: [Wtr-general] getting the exception valueThere's been on going threads both here & in the general [EMAIL PROTECTED] mailing list.IEs COM interface does not expose any of the HTTP information for the request.Suggestions have included using a small proxy server in between you and the actual site and then finding some way of querying it for the HTTP information.Nothing seems to have been done on that front.j.
On 10/24/05, Jonathan Kohl <[EMAIL PROTECTED]> wrote:Or in the body - not sure if getHTML will get the title tags or not.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Jonathan Kohl
> Sent: October 24, 2005 9:55 PM
> To: [email protected]
> Subject: Re: [Wtr-general] getting the exception value
>
> You could probably use getHTML, and then use a regular
> _expression_ to parse out the error from the HTML. You can
> often find that in the title tags:
> <title>404 Not Found</title>
>
> Hope that helps.
>
> -Jonathan
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto: [EMAIL PROTECTED]] On Behalf Of
> Pierre Garigue
> > Sent: October 24, 2005 9:38 AM
> > To: [email protected]
> > Subject: [Wtr-general] getting the exception value
> >
> >
> > Looking around the API I found this:
> >
> > Watir::Exception::NavigationException
> > "This exception is thrown if an http error, such as a 404,
> 500 etc is
> > encountered while navigating"
> >
> >
> > Does anyone have an example where this is used? I would
> also very much
> > like to be able to know if it was a 404 or a 500 for my logs
> >
> > Cheers
> >
> > Pierre Garigue
> > Quality Assurance
> > EXTEND>>MEDIA
> > 190 Liberty Street
> > Toronto, Ontario
> > Canada
> > M6K 3L5
> > _______________________
> > e:[EMAIL PROTECTED]
> > http://www.extend.com
> >
> >
> >
> > _______________________________________________
> > 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
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
