[wtr-general] Re: How to handle Exceptions in Watir

2009-09-25 Thread Mark Anderson

I'm sorry but I still don't have enough information.

So somewhere in your code, you are looking for something with a text
attribute of "Return to Previous Page" and watir is telling you that it does
not exist.  What do you want the program to do if it isn't found?  What have
you tried?

  /\/\ark

> -Original Message-
> From: watir-general@googlegroups.com [mailto:watir-
> gene...@googlegroups.com] On Behalf Of Vishal
> Sent: Wednesday, September 23, 2009 7:29 AM
> To: Watir General
> Subject: [wtr-general] Re: How to handle Exceptions in Watir
> 
> 
> I am getting the following error
> d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
> `assert_ex
> ists': Unable to locate element, using :text, "Return to Previous
> Page" (Watir::
> Exception::UnknownObjectException)
> from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:284
> :in `enabled?'
> from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:56:
> in `assert_enabled'
> from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:229
> :in `click!'
> from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:215
> :in `click'
> 
> 
> 
> On Sep 17, 9:19 pm, "Mark Anderson" 
> wrote:
> > What exception are you seeing?  What would you like to do when you
> encounter
> > it?  Without more information, it will be hard to give you more than
> basic
> > information about exception handling.
> >
> > Here is the link to a page about ruby exception handling that I refer to
> > when working in this
> area:http://ruby.activeventure.com/usersguide/rg/rescue.html
> >
> >                                 /\/\ark
> >
> >
> >
> >
> >
> > > -Original Message-
> > > From: watir-general@googlegroups.com [mailto:watir-
> > > gene...@googlegroups.com] On Behalf Of Vishal
> > > Sent: Thursday, September 17, 2009 2:02 AM
> > > To: Watir General
> > > Subject: [wtr-general] How to handle Exceptions in Watir
> >
> > > While running the testcase in Watir  if an Exception is encountered, I
> > > program quits at that point.
> > > How can we handle exception in Watir
> >
> > > Thanks,
> > > Vishal
> >
> > > __ Information from ESET NOD32 Antivirus, version of virus
> > > signature database 4432 (20090917) __
> >
> > > The message was checked by ESET NOD32 Antivirus.
> >
> > >http://www.eset.com
> >
> > > __ Information from ESET NOD32 Antivirus, version of virus
> > > signature database 4434 (20090917) __
> >
> > > The message was checked by ESET NOD32 Antivirus.
> >
> > >http://www.eset.com
> >
> > __ Information from ESET NOD32 Antivirus, version of virus
> signature
> > database 4434 (20090917) __
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com- Hide quoted text -
> >
> > - Show quoted text -
> > 
> 
> 
> __ Information from ESET NOD32 Antivirus, version of virus
> signature database 4449 (20090923) __
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> 
> __ Information from ESET NOD32 Antivirus, version of virus
> signature database 4458 (20090925) __
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4458 (20090925) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to handle Exceptions in Watir

2009-09-23 Thread Vishal

I am getting the following error
d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :text, "Return to Previous
Page" (Watir::
Exception::UnknownObjectException)
from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:229
:in `click!'
from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:215
:in `click'



On Sep 17, 9:19 pm, "Mark Anderson" 
wrote:
> What exception are you seeing?  What would you like to do when you encounter
> it?  Without more information, it will be hard to give you more than basic
> information about exception handling.
>
> Here is the link to a page about ruby exception handling that I refer to
> when working in this 
> area:http://ruby.activeventure.com/usersguide/rg/rescue.html
>
>                                 /\/\ark
>
>
>
>
>
> > -Original Message-
> > From: watir-general@googlegroups.com [mailto:watir-
> > gene...@googlegroups.com] On Behalf Of Vishal
> > Sent: Thursday, September 17, 2009 2:02 AM
> > To: Watir General
> > Subject: [wtr-general] How to handle Exceptions in Watir
>
> > While running the testcase in Watir  if an Exception is encountered, I
> > program quits at that point.
> > How can we handle exception in Watir
>
> > Thanks,
> > Vishal
>
> > __ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4432 (20090917) __
>
> > The message was checked by ESET NOD32 Antivirus.
>
> >http://www.eset.com
>
> > __ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4434 (20090917) __
>
> > The message was checked by ESET NOD32 Antivirus.
>
> >http://www.eset.com
>
> __ Information from ESET NOD32 Antivirus, version of virus signature
> database 4434 (20090917) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to handle Exceptions in Watir

2009-09-17 Thread Mark Anderson

What exception are you seeing?  What would you like to do when you encounter
it?  Without more information, it will be hard to give you more than basic
information about exception handling.

Here is the link to a page about ruby exception handling that I refer to
when working in this area:
http://ruby.activeventure.com/usersguide/rg/rescue.html

/\/\ark

> -Original Message-
> From: watir-general@googlegroups.com [mailto:watir-
> gene...@googlegroups.com] On Behalf Of Vishal
> Sent: Thursday, September 17, 2009 2:02 AM
> To: Watir General
> Subject: [wtr-general] How to handle Exceptions in Watir
> 
> 
> While running the testcase in Watir  if an Exception is encountered, I
> program quits at that point.
> How can we handle exception in Watir
> 
> Thanks,
> Vishal
> 
> > 
> 
> 
> __ Information from ESET NOD32 Antivirus, version of virus
> signature database 4432 (20090917) __
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> 
> __ Information from ESET NOD32 Antivirus, version of virus
> signature database 4434 (20090917) __
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4434 (20090917) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to handle Exceptions in Watir

2009-09-17 Thread Wesley Chen
require 'watir'
require 'watir/testcase'
class Test1 < Watir::TestCase
  def test1
  end

  def test2
  end
end

When there is exception in test1, test2 will still run.

Expect it could work.

Thanks.
Wesley Chen.


On Thu, Sep 17, 2009 at 3:02 PM, Vishal  wrote:

>
> While running the testcase in Watir  if an Exception is encountered, I
> program quits at that point.
> How can we handle exception in Watir
>
> Thanks,
> Vishal
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---