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> <<a href="mailto:adam@esterlines.com">adam@esterlines.com</a>><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. 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. 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. Problem described above, WatiN does not seem to have this problem.<br> 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. WatiN waits and tries again if it cannot find the element on the<br>page. 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. 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> open_browser_to_corporate_home_page<br><br> beginning_count = result_count<br><br> click_link 'Architectural Style'<br><br> assert_browse_section_is_active 'Architectural Style'
<br> assert_none_of_the_check_boxes_is_selected<br> assert_count_equals beginning_count<br><br> click_check_box 'Contemporary'<br> sleep 2<br> after_contemporary_count = result_count
<br> assert_count_less_than beginning_count<br><br> assert_browse_section_contains 'Architectural Style',<br>'Contemporary'<br><br>--<br>Adam Esterline<br><a href="http://adamesterline.com/">
http://adamesterline.com/</a><br>