我正在尝试找出下面的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>
答案 0 :(得分:-2)
你走了:
//body/div/div/div/div/ul/li[text()="precise location (GPS and network-based)"]
或
//li[text()="precise location (GPS and network-based)"]