Capybara/Selenium Cannot See a Given CSS
Recently, Capybara with Selenium driver was not able to see a given css element. Trying without the driver works though.
As it turns out, in my case, the css element was hidden. And Capybara by default cannot see hidden elements.
There are two ways to go around this:
a. Set Capybara global options to view hidden elements
Capybara.ignore_hidden_elements
b. Set particular DSL option to see hidden elements
select "hello", from: "Some question", visible: false
Written by Ace Dimasuhid
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#