<div class="list-title-name ng-binding"> NEW LIST </div>
<div class="list-title-name ng-binding"> Things I Like </div>
I want to click the element which matches the text NEW LIST
find("div.list-title-name" == NEW LIST).click #wrong method but want something like this
Can anyone specify a valid capybara method to do this?
The following should do what you want
find('div.list-title-name', text: 'NEW LIST').click()