D'Oh! I didn't realize that either.
If your text isn't just hidden from sight, you can use the .include?
method. That's what I usually do (as evidenced by my ignorance with
the use of .visible?).
ie.text.include?('My Text')
Sorry for the confusion! I'll stop multitasking while I try to answer
questions now.
-Tiffany
On Nov 12, 3:36 pm, John Fitisoff <[email protected]> wrote:
> @browser.text will return a string and strings don't have a visible? method.
>
> Think @browser.text.include? should work.
>
> --- On Thu, 11/12/09, QAguy <[email protected]> wrote:
>
> > From: QAguy <[email protected]>
> > Subject: [wtr-general] Re: Example of assertions
> > To: "Watir General" <[email protected]>
> > Date: Thursday, November 12, 2009, 2:08 PM
>
> > I try something like this:
>
> > @browser.text.visible?("Preparing to Optimize").should ==
> > false
>
> > but I get:
>
> > undefined method `visible?' for
> > #<String:0x1032d3ad0>
>
> > I'm working with Safariwatir.
>
> > Thanks
> > QAguy
>
> > On Nov 12, 4:22 pm, Tiffany Fodor <[email protected]>
> > wrote:
> > > Oops, sorry - to see if text is visible, use:
>
> > > ie.text('My Text').visible?
>
> > > On Nov 12, 2:09 pm, QAguy <[email protected]>
> > wrote:
>
> > > > Does anyone have examples of assertions. For
> > example how would I
> > > > assert that text on a page in either visible or
> > invisible.
>
> > > > Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---