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

2011-08-13 Thread Jeff Nyman
Hi all. I'm currently using watir-webdriver and I'm trying to find text that will appear on a web page. I know you can do this: browser.text.should include(my text) However, that won't accept a regular expression. I found that something called Watir::Simple lets me do something like this:

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

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.

Re: [wtr-general] Re: How to change select_list box value ?

2011-08-13 Thread Yuping Zhong
Please try to use index! On Thu, Aug 11, 2011 at 8:36 PM, Dmitri Karusar flysteppe...@gmail.comwrote: No luck with: $ie.frame(:name,mainFrame).select_list(:name,defaultLicensingPeriod).set(2 months) The thing is All select_menus on my page have same span class: span class=containerinput

Re: [wtr-general] Re: Object no longer attached to the DOM error on doing a exists call

2011-08-13 Thread Alister Scott
This has been released. Thanks to Jari. See an article about how to use it here: http://watirmelon.com/2011/08/14/telling-watir-webdriver-to-always-locate-elements-upon-use/ -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.