<br>Yes, Andrei&#39;s solution gives me the same behavior I was getting before.<br><br>i.e. If I have a link that does some jquery, and makes a div appear.<br><br>jqueryLink click.<br>self pause: &#39;5000&#39;.<br>self assert: (self divByXPath: &#39;//div...&#39; ) isPresent. <br>

<br>Seems the pause is actually getting triggered before the jquery 
click has a chance to change the dom. So the click happens, there is a 
pause, the div appears and the assert is called too quickly to find it ( I think ).<br><br>
Indeed, my problem really boils down to the 
default timeout value slowing down my test suite, so I think calling selenium setTimeout is the right approach. Doing that with a significantly reduced value seems to be
 doing the trick.<br>
<br>
Thanks all,<br>
Joel<br><br><br><br><div class="gmail_quote">On Fri, Mar 4, 2011 at 5:39 AM, Avi Shefi <span dir="ltr">&lt;<a href="mailto:avishefi@gmail.com" target="_blank">avishefi@gmail.com</a>&gt;</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;">


<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&#39;s clear that the reason you use waitForCondition in the first place is to detect the existence of an element. So why doesn&#39;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"><div><div></div><div>On Fri, Mar 4, 2011 at 12:03 PM, Andrei Vasile Chis <span dir="ltr">&lt;<a href="mailto:chisvasileandrei@gmail.com" target="_blank">chisvasileandrei@gmail.com</a>&gt;</span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>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&#39;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 &quot;self webTester pause: 10000&quot; 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&gt;&gt;getEval: aScript</div><div><span style="white-space: pre-wrap;">        </span>self subclassResponsibility</div>





</div><div><br></div><div>WtWebTester&gt;&gt;<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 &gt;&gt;</span>getEval: aScript</div><div>

<span style="white-space: pre-wrap;">        </span>^ self processCommand: &#39;getEval&#39; withParams: (Array with: aScript).</div><div><br></div><div><div><span style="font-size: 13px;">WtSeleniumWebTester &gt;&gt;</span>pause: waitTimeInMillis</div>





<div><span style="white-space: pre-wrap;">        </span>self getEval: &#39;var date = new Date(); var curDate = null;  while (curDate = new Date() - date &lt; &#39;, waitTimeInMillis asString, &#39;){} &#39;.</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></div></div><div>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">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></div></blockquote></div><br></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">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>