[英]get buttons with xpath with strange attribute
in a web page I have to select all the buttons like this:在 web 页面中,我必须 select 所有按钮都是这样的:
<button :class="{'complete': isComplete, 'open': open}" :disabled="orderedEvents.length === 0"></button>
but with this xpath:但是有了这个 xpath:
//button[contains(@class, 'isComplete, \'open\'')]
do not works!不工作!
You can find attributes that contains colons in the name using @*[name()]
and find it's value using .
您可以使用
@*[name()]
查找名称中包含冒号的属性,并使用.
//button[@*[starts-with(name(),':class') and contains(., \"isComplete, 'open'\")]]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.