On 2/15/06, Chris Schmechel <[EMAIL PROTECTED]> wrote: .... > > Is there an equivalent method in Watir or something I can query in the DOM > to return the HTTP status after the ie.button().click method finishes? It > would be nice to have something similar to $mech->status in Perl. I'm only > aware of the ie.contains_text() method which isn't quite right.
Hi Chris! >From a glance at watir.rb it looks like some error checking is done internally as you navigate, using the 'check_for_http_error' method. However as far as I can tell, that checks for "shdoclc.dll" in the current URL, which may not be what you want. In this sort of case, after a click, I just go ahead and start asserting for the existence of values I know should be on the resulting page. Then if any of the asserts fail I know the point where something went wrong. I guess alternately if the web app uses a custom 404 page that overrides IE's default you could assert/check that the 404 page text is not present. There could be some part of Watir I haven't seen where more HTTP status code checking lives, or maybe there's a quick way to use the IE OLE interface directly to get the status. I glanced over the MSDN reference but nothing 'clicked' as far as an easy way to do it. Thanks Bill _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
