我一直在寻找xml的Xpath,它具有以下结构...
<abc>
<unique>
<findme uniqueAtrr="itsme">Already Found Xpath For This</findme>
</unique>
<findme></findme>
<findme></findme>
<findme uniqueAtrr="itsme"> You Got Me</findme> //NOTE : We don't know this position
<findme></findme>
</abc> 我得到了已经找到的XPath,使用
/abc//unique/findme[@uniqueAtrr="itsme"]所以我认为最好的查找方法是搜索findme,它不在唯一的tag...or中,只在我尝试过的siblings...the中找到节点。。。
/abc//findme这将为我提供唯一标记中的一个:(
发布于 2017-08-06 20:54:09
尝试在下面的xpath中匹配"You Got Me"
/abc/unique/following-sibling::findme[@uniqueAtrr="itsme"]https://stackoverflow.com/questions/45532088
复制相似问题