Thank you.

Margam

On Tue, Jan 27, 2009 at 12:48 PM, Tiffany Fodor <[email protected]> wrote:

>
> Yep, you've got it right.
>
> In it's default form, you can't specify a success message for the
> verify method.  If you really needed to, however, you could extend the
> method to do this.
>
> -Tiffany
>
> On Jan 27, 1:36 pm, Karthikeyan Margam <[email protected]> wrote:
> > Hi Tiffany,
> > Thank you for the quick reply. This definitely helps me.
> >
> > So if I understand this correctly, the verify() method always has the
> > failmessage as the default message. Is my understanding correct?
> >
> > Thank you.
> > Margam
> >
> > On Tue, Jan 27, 2009 at 12:18 PM, Tiffany Fodor <[email protected]>
> wrote:
> >
> > > Hi Margam!
> >
> > > You could separate your checks into two different tasks:
> >
> > > def verify_text(searchedtext,passmessage,failmessage)
> > >     verify($ie.text.inclue?(searchedtext), message=failmessage)
> > >    if $ie.text.include?(searchedtext)
> > >         puts passmessage
> > >    else
> > >        puts failmessage
> > >    end
> > > end
> >
> > > Hope this helps!
> >
> > > -Tiffany
> >
> > > On Jan 27, 12:16 pm, Margam <[email protected]> wrote:
> > > > HI all,
> > > > I am trying to verify if particular text is present in the page using
> > > > verify method. And also output corresponding "passmessage" and
> > > > "failmessage". This is the code snippet I am using:
> > > > -------------------------
> > > > def verify_text(searchedtext,passmessage,failmessage)
> > > >     if verify($ie.text.include?(searchedtext))==true
> > > >       puts passmessage
> > > >   else
> > > >       puts failmessage
> > > >   end
> > > > end
> > > > ---------------------------------------------------
> >
> > > > Note: all arguments for this function are passed from the main
> script.
> >
> > > > The problem I am facing is, even if the "verify" passes, only the
> > > > "failmessage" is output. The "passmessage" is never output.
> >
> > > > The reason I want to use "verify" instead of a simple
> > > > "$ie.text.inclue?" is, so that not only the failmessage is output but
> > > > also a failure is raised.
> >
> > > > Hope I am clear.
> > > > Can someone tell me what the problem is?
> > > > Thank you
> >
> > > > Margam
> >
>

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

Reply via email to