在網頁中,我必須選擇這樣的所有按鈕:
<button :class="{'complete': isComplete, 'open': open}" :disabled="orderedEvents.length === 0"></button>
但是有了這個 xpath :
//button[contains(@class, 'isComplete, \'open\'')]
不作業!
uj5u.com熱心網友回復:
您可以使用查找名稱中包含冒號的屬性,@*[name()]并使用查找它的值.
//button[@*[starts-with(name(),':class') and contains(., \"isComplete, 'open'\")]]
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/478023.html
