I want to check if the given string is not in the table row. But when using the code below:
page.should have_xpath('//td', :text => r)
It matches the text within the table too. For example there are not values with ‘G’ in the table but ‘PG’ are, so the above code returns positive for ‘G’ also.
How can I check the precise string with Capybara?
Solved it with this: