开发者

Capybara CSS or xpath to find an element based on two conditions

开发者 https://www.devze.com 2023-03-28 09:25 出处:网络
I\'m trying to use the find method to find an element based on the follow开发者_开发技巧ing: id starts with ship_

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"]);
0

精彩评论

暂无评论...
验证码 换一张
取 消