Capybara CSS or xpath to find an element based on two conditions
I'm trying to use the find method to find an element based on the follow开发者_开发技巧ing:
id starts with ship_ and the data-coordinates attribute does not equal 0,0,0.
The css for the first part i have easily enough:
find('path[id^="ship_"]')
but i'm not sure how add the second condition.
If Capybara supports CSS3, you could try:
path[id^="ship_"]:not([data-coordinates="0,0,0"]);
精彩评论