Re: [wtr-general] Finding Text on a Page, Using Regular Expressions

2011-08-13 Thread Željko Filipin
On Fri, Aug 12, 2011 at 7:33 PM, Jeff Nyman jeffny...@gmail.com wrote:
 browser.text.should include(my text)
 However, that won't accept a regular expression.

Try something like this:

target.should match regex

From http://cheat.errtheblog.com/s/rspec/

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Finding Text on a Page, Using Regular Expressions

2011-08-13 Thread Jari Bakken
Den 13. aug. 2011 kl. 11:42 skrev Jeff Nyman jeffny...@gmail.com:

browser.text.should include(my text)


  browser.text.should match(/my text/)

or

  browser.text.should =~ /my text/

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com