Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-11 Thread watir-user watir-user
Hi Charley and Paul, If I use rescue true in the method, i wont be getting any error all the methods will execute. But, the method which has error does not shows what actual error it has. Here is the code which i executed def test_yahooSite test_site = 'http://www.mail.yahoo.com' $ie

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-11 Thread Vamsee Krishna M
I think what he meant was he wants to execute each and every statement without considering whether the previous statement was failed. So the solution would be like putting try rescue catch block around around each line and code won't look professional. Is there any flag in watir that can be

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-11 Thread Charley Baker
There's no flag in watir to swallow all exceptions, that's rather dangerous behavior and not recommended. You could wrap methods with begin/rescue blocks and print out the exceptions as they occur - follow Zeljko's example above and the more specific the exceptions you catch the better. I'd

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-10 Thread Charley Baker
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

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-10 Thread Paul Carvalho
You're repeating yourself, Charley. ;-) This new assertions.rb covers one aspect of what Watir User asked but not the other: Its not only related to assertions .. . That's why I described a general Ruby construct for recovering from methods regardless of what Watir version you're using.

[Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-09 Thread watir-user watir-user
Hi, Following methods i want to call in another method def assertButton assert($ie.button(:caption, Click Me).enabled?) end def assertLink assert($ie.link(:text, Click Me).exists? end def assertTextfield assert($ie.text_field(:name, field1).exists?) end def assertRbutton