Bret Pettichord wrote:

 We [...] have a problem with tests hanging on clickAndWait or
 typeAndWait.

 The problem is that our pages have javascript validation. These
 actions only result in a post if the javascript validates. We have
 tests that hang because the data fails the validation. The
 clickAndWait is waiting for a page load that will never happen.

Can you predict that the validation is going to fail, based on the state of the app at that point in the test? If so, try using "click" rather than "clickAndWait" at those points.

 P.S. This is not a problem with Watir. It only has one click command
 and it automatically waits when it should.

How do you get Watir to wait automatically?

It would be fantastic if we could get Selenium to wait when appropriate, and do away with the "AndWait" hint. I actually had an implementation of this (waiting automatically) working quite some time back, but it was based on "onbeforeload" and "onbeforeunload" events which, while they work in IE and Firefox, are non-standard. We figured there wasn't much point implementing that solution when restricted Selenium's portability.

--
cheers, MikeW                            http://www.dogbiscuit.org/mdub/

_______________________________________________
Selenium-devel mailing list
Selenium-devel@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel

Reply via email to