You can also pull the assertions file and use it with Watir 1.4.1. https://svn.openqa.org/svn/watir/trunk/watir/watir/assertions.rb Download this file, put it in your watir/watir directory and use it the same way I mentioned in my previous mail.
-Charley On 4/10/07, Paul Carvalho <[EMAIL PROTECTED]> wrote:
I suppose you could always wrap a "rescue true" around each of your assertions. There are different ways of doing this. This is just off the top of my head but I'm pretty sure it works because I've done something similar in the past. One way would be: def assertButton assert($ie.button(:caption, "Click Me").enabled?) rescue true end If you have other commands that are likely to fail (e.g. a navigate link command when the link isn't there), then you could wrap the rescue for the whole method like this: def assertButton assert($ie.button(:caption, "Click Me").enabled?) rescue true end Where the "rescue" and "true" are the last lines before the "end" of the method. This will exit the method nicely and allow you to go to the next method. There are a lot of neat things you can do with a container like this at the end of a test method. If you want more information about recovering from methods like this you should check out the "Programming Ruby" book, second edition. Hope this helps. Paul C. On 10/04/07, watir-user wrote: > > > Hi Charley, > > Can you tell me how to overcome the same in Watir 1.4.1. Its not only > related to assertions, the problem i am facing is if the method which i am > calling if does not execute for some reason the next step of the code does > not executes in the called method. So, is there any other way to over come > this problem in Watir 1.4.1? > > Any suggestions most welcome > > Thanks, > _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general