RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Decoupling CSS Selectors From Your Tests

For a long time, I’ve been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capybara). In this short article, I’m going to try Eduardo Gutierrez’s suggestion of using data attributes for targeting DOM elements instead of CSS selectors. Check it out

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in