I found in another forum that the contains_text method has been deprecated in watir webdriver. I will be darned if I can find documentation showing precisely what methods webdriver supports. You might think http://watirwebdriver.com/ would have that. But, hmmm, no.
0
votes
1 Answers
5
votes
The API docs are a good starting place to look for supported methods - http://rubydoc.info/gems/watir-webdriver/frames.
For contains_text
, you should just get the text using the text
method and then use Ruby's string comparison methods.
You could do one of the following:
browser.text.include?(str)
browser.text =~ /regexp/