0
什麼是的Xpath選擇這個jQuery選擇的第一要素:$('.A .B:eq(1)') ?
的XPath的子元素
HTML樣品
<div class="x A z">
<div class="y">
<div class="r B z"></div> <---- that is that I need to select
<div class="r B z"></div
>
...
到目前爲止,我已經試過這樣:
(//div[(@class='A') and div[contains(concat(' ', @class, ' '), 'B')]])[1]
嘗試使用此cssSelector ==> By.cssSelector(「div [class * ='A'] div [class * ='B']:f irst-child「) – Santoshsarma