<div class="list-title-name ng-binding"> NEW LIST </div>
<div class="list-title-name ng-binding"> Things I Like </div>
我想点击与文字NEW LIST匹配的元素
find("div.list-title-name" == NEW LIST).click #wrong method but want something like this
任何人都可以指定有效的水豚方法吗?
答案 0 :(得分:2)
以下应该做你想做的事
find('div.list-title-name', text: 'NEW LIST').click()