Is there a way to find an element by the text it contains?
Given:
<div>foobar</div>
browser.div(text: contains('foo')).present? # => true
Yes! Just use a regular expression:
browser.div(text: /foo/).present?