Hi there, I&#39;ve got more of a Ruby question than a Watir one, so I hope you don&#39;t mind if I post it here first.<br><br>I am in the process of rewriting my first Ruby/Watir scripts from a year ago - a site-map walkthrough script to collect some simple Performance metrics.&nbsp; When I first wrote the script, I used the Test/Unit (Class/Test) structure because that was the only way I knew how to structure scripts at that time. (
i.e. used the Watir examples as a guide.)<br><br>A year later, I now know how to structure my scripts in a more regular Ruby script fashion so I updated my walkthrough script.&nbsp; I used a neat trick in my old script to recover from a script error (
e.g. assertion failure) and continue on but I seem to be having some problems doing the same thing with the Ruby script format.&nbsp; I was wondering if someone can offer any advice to help me figure this out.<br><br>Here&#39;s what I&#39;ve got so far:
<br><br>## Main script snippet:<br>&nbsp; ...<br>&nbsp; # open the IE browser<br>&nbsp; $ie = IE.new<br>&nbsp; <br>&nbsp; # A) Walk the Public Pages.&nbsp; =&gt; Need to Trap this so the &quot;something_went_wrong&quot; variable works correctly<br>&nbsp; page_set_to_check( walk_Public_Pages )
<br><br>----<br><br># Here&#39;s the page_set_to_check() method:<br><br>module site_walkabout_methods<br><br>&nbsp; def page_set_to_check( page_set )<br>&nbsp;&nbsp;&nbsp; &nbsp; begin<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; page_set<br>&nbsp;&nbsp;&nbsp; &nbsp; rescue =&gt; e<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $something_went_wrong = &#39;Yes&#39;
<br>&nbsp;&nbsp;&nbsp; &nbsp; end<br>&nbsp;&nbsp;&nbsp; &nbsp; write_status<br>&nbsp; end<br><br>end<br>----<br><br>So, the &quot;walk_Public_Pages&quot; routine gets called, but if there&#39;s an assertion failure in it (e.g. because of an incorrect link name), the &quot;rescue =&gt; e&quot; part of page_set_to_check() doesn&#39;t run like I would expect it to.&nbsp; In fact, the whole script terminates at this point!
<br><br>Please let me know if you have any helpful suggestions to get the script to auto-recover and continue.<br><br>Thanks.&nbsp; Paul C.<br><br><br>