我找不到xpath的元素

时间:2015-12-18 15:15:02

标签: html xpath

我正在尝试找出下面的xpath元素。什么是xpath?

精确位置(GPS和基于网络)

这是HTML代码。

<div class="permission-bucket" jsinstance="1" jstcache="75">
<div class="bucket-icon-and-title" jstcache="87">
<jsl jstcache="110">
</div>
<div style="display:none" jstcache="88"/>
 <ul class="bucket-description" jstcache="89">
 <li jsinstance="0" jstcache="90">read your contacts</li>
 <li jsinstance="*1" jstcache="90">modify your contacts</li>
 </ul>
 </div>
 <div class="permission-bucket" jsinstance="2" jstcache="75">
 <div class="bucket-icon-and-title" jstcache="87">
 <div style="display:none" jstcache="88"/>
 <ul class="bucket-description" jstcache="89">
 ***<li jsinstance="0" jstcache="90">precise location (GPS and network-based)</li>***
 <li jsinstance="*1" jstcache="90">approximate location (network-based)</li>

1 个答案:

答案 0 :(得分:-2)

你走了:

//body/div/div/div/div/ul/li[text()="precise location (GPS and network-based)"]

//li[text()="precise location (GPS and network-based)"]