I've started doing some work on Ajax tests. So far I'm using wait_until to poll for elements to exist as the DOM changes based on various events triggering. So far so good from what I've seen. I'm spending some time to read up on the links on the Watin site and downloaded the project with source.
<br><br> One issue they seem to have overcome is the cross site scripting problem mentioned in a previous post or Jira ticket. Polling for controls might be something they do across the board for better Ajax support. It might be something to consider for Watir as the world moves to Web
2.0.<br><br> On a sidenote, I'm looking at testing IE7 and browser tabs. I haven't found any updated documentation on IE's com model on the MSDN site that will allow me to access tabs. Anyone come across this? It's also going to be an issue with FireFox, that I'll delay until I abstract the browser access enough to run any of four drivers - ie, ff, safari, and selenium.
<br><br>-Charley <br><br><div><span class="gmail_quote">On 4/25/07, <b class="gmail_sendername">Bret Pettichord</b> <<a href="mailto:bret@pettichord.com">bret@pettichord.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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><span class="sg"><br>--<br>Adam Esterline<br><a href="http://adamesterline.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://adamesterline.com/</a><br>
</span><br>_______________________________________________<br>Wtr-development mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Wtr-development@rubyforge.org">Wtr-development@rubyforge.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://rubyforge.org/mailman/listinfo/wtr-development" target="_blank">http://rubyforge.org/mailman/listinfo/wtr-development</a><br></blockquote></div>
<br>