[Wtr-general] contains_text with regular expression

Bret Pettichord bret at pettichord.com
Sun Aug 20 18:35:32 EDT 2006


sikander wrote:
>
> assert($ie.contains_text(/Search/).exists?)
>
Dave's advice is correct.

My suggestion is to avoid using contain_text entirely. I find that it 
leads to confusion and intend to deprecate it.

  assert($ie.text =~ /Search/)

or

  assert($ie.text.match /Search/)

Bret



More information about the Wtr-general mailing list