Adam Esterline recently reported some stability issues with Watir on his blog.<br><br><a href="http://adamesterline.com/2007/04/23/watin-watir-and-selenium-reviewed/">http://adamesterline.com/2007/04/23/watin-watir-and-selenium-reviewed/
</a><br><br>Because of them, he decided to use Watin instead, which did not have these problems. I asked him for more information, and he provided the following. This is something that I would like to understand better.<br>
<br>Bret<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Adam Esterline</b> &lt;<a href="mailto:adam@esterlines.com">adam@esterlines.com</a>&gt;<br>Date: Apr 25, 2007 6:33 AM
<br>Subject: Watir Stability Issues<br>To: <a href="mailto:bret@pettichord.com">bret@pettichord.com</a><br><br></span>Bret,<br><br>Thanks for your comment on my blog.<br><br>We were using Watir 1.4.1.&nbsp;&nbsp;&nbsp;&nbsp;We also tried upgrading to 
1.5? and the<br>same problem existed.<br><br>We saw that accessing an element while the browser was busy caused the<br>test to hang.&nbsp;&nbsp; This happened frequently for us as our site has lots<br>of ajax calls.<br><br>There are two differences between Watir and WatiN that really made the
<br>difference for our team.<br><br>1.&nbsp;&nbsp;Problem described above, WatiN does not seem to have this problem.<br>&nbsp;&nbsp;May because the use a STA - check this link out for more<br>information: <a href="http://watin.sourceforge.net/apartmentstateinfo.html">
http://watin.sourceforge.net/apartmentstateinfo.html</a>.<br>2.&nbsp;&nbsp; WatiN waits and tries again if it cannot find the element on the<br>page.&nbsp;&nbsp; This makes it much easier to code tests.<br><br>I am not saying that WatiN is perfect, but these two things help us
<br>keep our repeatable/reliable.<br><br>Below is an example of a watir test we wrote.&nbsp;&nbsp; Not sure that it will<br>help, but I thought I would pass it along.<br><br>If you have any other questions/comments, please let me know.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open_browser_to_corporate_home_page<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beginning_count = result_count<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;click_link &#39;Architectural Style&#39;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert_browse_section_is_active &#39;Architectural Style&#39;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert_none_of_the_check_boxes_is_selected<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert_count_equals beginning_count<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;click_check_box &#39;Contemporary&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after_contemporary_count = result_count
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert_count_less_than beginning_count<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert_browse_section_contains &#39;Architectural Style&#39;,<br>&#39;Contemporary&#39;<br><br>--<br>Adam Esterline<br><a href="http://adamesterline.com/">
http://adamesterline.com/</a><br>