<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">Sounds like this solution will make most browsers hang.. Why not use a setTimeout ?<br>Reading your question, it's clear that the reason you use waitForCondition in the first place is to detect the existence of an element. So why doesn't waitForCondition suffice? In the case you want to cascade the assertions, you can just do a waitForCondition that combines both assertions (checking that an element exists, and also checking its value).<br>
<br>Avi.<br></font></font></font><br><div style="margin: 0pt;" name="sig_d41d8cd98f"></div><div class="gmail_quote">On Fri, Mar 4, 2011 at 12:03 PM, Andrei Vasile Chis <span dir="ltr"><<a href="mailto:chisvasileandrei@gmail.com">chisvasileandrei@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Joel,<div><br></div><div>A very simple way (and perhaps not the best way) in which you could obtain just a delay is to simply execute a time - comparison loop. You don't have to execute it inside a <span style="border-collapse: collapse; font-family: arial,sans-serif; font-size: 13px;">waitForCondition block. For example you could extend WebTester with the following methods and then in your test just call "self webTester pause: 10000" and then verify your condition using the WtWebTester api.</span></div>
<div><font face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font></div><div><font face="arial, sans-serif"><span style="border-collapse: collapse;"><div>
<span style="font-size: 13px;"><span style="font-family: arial; font-size: small; border-collapse: separate;"><div><div>WtWebTester>>getEval: aScript</div><div><span style="white-space: pre-wrap;">        </span>self subclassResponsibility</div>
</div><div><br></div><div>WtWebTester>><span style="border-collapse: collapse; font-family: arial,sans-serif;">pause: waitTimeInMillis</span></div><div><span style="border-collapse: collapse; font-family: arial,sans-serif;"> </span>self subclassResponsibility</div>
</span></span></div><div><span style="font-size: 13px;"><br></span></div><div><span style="font-size: 13px;">WtSeleniumWebTester >></span>getEval: aScript</div><div>
<span style="white-space: pre-wrap;">        </span>^ self processCommand: 'getEval' withParams: (Array with: aScript).</div><div><br></div><div><div><span style="font-size: 13px;">WtSeleniumWebTester >></span>pause: waitTimeInMillis</div>
<div><span style="white-space: pre-wrap;">        </span>self getEval: 'var date = new Date(); var curDate = null; while (curDate = new Date() - date < ', waitTimeInMillis asString, '){} '.</div>
</div></span></font></div><div><div><br></div></div><div><br></div><div><br></div><div>My 2cents</div><div><br></div><font color="#888888"><div>Andrei</div>
</font><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>