[wtr-general] Test if a specific value exists in a field

2009-07-05 Thread Caden
Hello, I would like to test if a specific value exists in a field. The following is what people use for div: $ie.div(:id, 'legend').text.include?(Bob T. Lewis) I want to use this for text_field, such as: $ie.browser.text_field (:id, 'legend').text.include?(Bob T. Lewis).should==true Should it

[wtr-general] include? text with special characters

2009-07-05 Thread Peace
Hi everyone, I have a page with html like this: div id=Info class=ffreq First line. br/ Second line. (some text) br/ /div I try to use this watir code: ie.div(:id, Info).text.include?(First line. Second line. (some text)) .should==true I get this error: Some characters cannot be mapped using

[wtr-general] Re: include? text with special characters

2009-07-05 Thread marekj
Is this issue happening only on this piece of text? I don't know the solution to this encoding problem with microsoft cp1252 but you can google it for some answers. As to the code let's break it down into 3 elements. 1. grab text from div with watir mytext = ie.div(:id, Info).text 2. use Ruby to

[wtr-general] Re: Test if a specific value exists in a field

2009-07-05 Thread marekj
see core Ruby String class and its methods http://www.ruby-doc.org/core/classes/String.html run examples, you will like it. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Sun, Jul 5, 2009 at 3:54 PM, Cadencdnwins...@gmail.com wrote: Hello, I