Hi

I am trying to locate using exists? a <p> in my page which is seperated
by two <br> 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:
<p>The Promotional Code you have entered has not been
recognised.<br><br>Please check your Promotional Code and try again.<p>

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.<br/><br/>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.<br><br>Please check your Promotional Code and try
again.").exists?


Any help much appreciated.

Thanks in advance
> false

-- 
Posted via http://www.ruby-forum.com/.