I am using Capybara(capybara 3.1.0) for system tests in Rails project(Rails 5.2.0).
What is the way to ensure element is not visible.
I was using the visible: false
option until I just found it matches visible elements, too.
For example I use:
find("h1", visible: false).text
There is no exception, and the text of the h1 is printed in the console, while h1 is definitely visible.
Is this expected? What is the logic behind this behavior? And what is the correct way to ensure element is not visible?