From: Brad Symons Date: 2012-01-18T02:31:57+09:00 Subject: Finding a

text which contains
Hi I am trying to locate using exists? a

in my page which is seperated by two
tags, as shown below. In the IRB, these show as \n when I retrieve the text, but using that same value to locate it is not working. The html:

The Promotional Code you have entered has not been recognised.

Please check your Promotional Code and try again.

In IRB: > browser.p(:index => 7).text > "The Promotional Code you have entered has not been recognised\n\nPlease check your Promotional Code and try again." In IRB: > browser.p(:text => "The Promotional Code you have entered has not been recognised.\n\nPlease check your Promotional Code and try again.").exists? > false 2nd attempt: > browser.p(:text => "The Promotional Code you have entered has not been recognised.

Please check your Promotional Code and try again.").exists? > false 3rd attempt: > browser.p(:text => "The Promotional Code you have entered has not been recognised.

Please check your Promotional Code and try again.").exists? Any help much appreciated. Thanks in advance > false -- Posted via http://www.ruby-forum.com/.