[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Execution stops once exception is encountered

Vishwanath Uppala

10/13/2007 5:04:00 AM

Hi all,

I am using ruby and watir to test my web application.
I wanna run watir script 24 x 7 without stopping.
The problem is that the ruby stops execution each time
it encounters an exception for e.g if it fails to locate
a frame on a web page it gives out exception and stops executing.

Is there any way by which i can continue execution of the script
even after encountering exceptions.

Thanking you in advance

Regards
vishwanath
--
Posted via http://www.ruby-....

4 Answers

Brian Adkins

10/13/2007 5:09:00 AM

0

On Oct 13, 1:03 am, Vishwanath Uppala <vishwanath.upp...@gmail.com>
wrote:
> Hi all,
>
> I am using ruby and watir to test my web application.
> I wanna run watir script 24 x 7 without stopping.

http://www.n...

Gerardo Santana Gómez Garrido

10/13/2007 5:16:00 AM

0

2007/10/12, Vishwanath Uppala <vishwanath.uppala@gmail.com>:
> Hi all,
>
> I am using ruby and watir to test my web application.
> I wanna run watir script 24 x 7 without stopping.
> The problem is that the ruby stops execution each time
> it encounters an exception for e.g if it fails to locate
> a frame on a web page it gives out exception and stops executing.
>
> Is there any way by which i can continue execution of the script
> even after encountering exceptions.
>
> Thanking you in advance
>
> Regards
> vishwanath


Sure, you can literally rescue the offending code. Take a look at this example:

$ cat test.rb
2.downto(-2) {|i|
begin
puts "10/#{i} == #{10/i}"
rescue => e
puts e.message
end
}
$ ruby test.rb
10/2 == 5
10/1 == 10
divided by 0
10/-1 == -10
10/-2 == -5

--
Gerardo Santana

Eric Hodel

10/13/2007 5:27:00 AM

0

On Oct 12, 2007, at 22:10 , Brian Adkins wrote:
> On Oct 13, 1:03 am, Vishwanath Uppala <vishwanath.upp...@gmail.com>
> wrote:
>> Hi all,
>>
>> I am using ruby and watir to test my web application.
>> I wanna run watir script 24 x 7 without stopping.
>
> http://www.n...

How does the URL for a network monitoring program help keep a script
running?

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars



trotsky

7/25/2013 4:53:00 PM

0

On 7/25/13 8:59 AM, David Johnston wrote:
> On 7/25/2013 7:46 AM, Barry Margolin wrote:
>> In article <6472v89bivj404a3e1qi1efsh37mff9it9@4ax.com>,
>> Mason Barge <masonbarge@gmail.com> wrote:
>>
>>> On Thu, 25 Jul 2013 00:54:17 -0700 (PDT), tmc1982@gmail.com wrote:
>>>
>>>> https://www.facebook.com/BoycottN...
>>>>
>>>> Community
>>>> Why are pedophiles allowed to be on Nickelodeon staff? Anyone who still
>>>> allows their children to watch Nickelodeon after doing a simple Google
>>>> search for the name Dan Schneider - WANTS their child to get molested.
>>>
>>> I promise, I will not watch a single show on Nickelodeon as long as --
>>> forgot his name -- does whatever he does for them.
>>
>> I'm in my 50's. I guess I've been boycotting them since they came on the
>> air.
>>
>
> I used to watch the Tomorrow People.


I used to watch "Roseanne" reruns on Nick at Nite.


--
Never post something on the internet unless you have a point of
reference. You will look like a moron otherwise.