Julien, If the action fails, wouldn't be desirable to throw an exception? Either way is usable I suppose. The timeout is apparently specified in milliseconds though, and I've found from personal experience that 30000 is a pretty good number to use.
-JF On Jun 7, 2006, at 12:22 AM, Julien HENRY wrote: > Hi Jon, > > Take a look on this thread : http://forums.openqa.org/message.jspa? > messageID=6345 > > Selenium provide a method named "waitForPageToLoad", that is > implicitly called after open(), but not after click(). The problem > is it is impossible to know if the "click" make a page to load or > not. And if you call "waitForPageToLoad" and no page is actually > loading, the call wait until timeout and raise an exception. > Perhaps we could use this ugly trick : > > public void click(...) { > selenium.click(...); > try { > waitForPageToLoad(5?); > } catch (SeleniumException e) { > // Do nothing, supposing no page is loading > } > } > > ++ > Julien > > ----- Message d'origine ---- > De : Jon Frisby <[EMAIL PROTECTED]> > À : [EMAIL PROTECTED]; [EMAIL PROTECTED] > Envoyé le : Mercredi, 7 Juin 2006, 2h20mn 23s > Objet : Another Selenium fix... > > This patch compensates for the fact that the Selenium client library > doesn't actually wait for the page to finish loading when you do an > open() or click(). This was resulting in me having to add > Thread.sleep(some_way_too_large_number) in my tests for things to > work. > > > Can you tell me what the expected behavior of setFormParameter is? > For the moment I have it delegate to setTextField, but I suspect that > that's wrong behavior (thus it's not included in my patch)... > > -JF > _______________________________________________ Jwebunit-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-development
