[wtr-general] Re: Example of assertions

2009-11-13 Thread QAguy
Can you give me an example of code (generic example) that would allow be to check if a piece of text is visible on not on the browser page? Thanks in advance On Nov 12, 5:38 pm, Ethan notet...@gmail.com wrote: This is incorrect. #text returns a string, not an element, and it has no #visible?

[wtr-general] Re: Example of assertions

2009-11-13 Thread Ethan
That is a tricky question. There are two much easier questions which may help you. 1. Does the piece of text exist on the page? If being visible is synonymous with existing on your page, it is much easier, and the browser.text.include?(piece_of_text) code will work. But it sounds like this doesn't

[wtr-general] Re: Example of assertions

2009-11-12 Thread Tiffany Fodor
Ah - I didn't realize this, but you need to require it: require 'watir/contrib/visible' -Tiffany On Nov 12, 3:08 pm, QAguy qablogm...@gmail.com wrote: I try something like this: @browser.text.visible?(Preparing to Optimize).should == false but I get: undefined method `visible?' for