With Capybara I am used to searching first('div', text: 'asdf')
, but is there a way to search for elements that do not have the text?
I tried first('div', text: /^(?!asdf)/)
and it still matches on div with 'asdf' text.
I checked to make sure my regex is right though: https://rubular.com/r/CN6MYKJNahiohD
Any ideas?