Reputation: 89
How can I get Xpath of the following element:
<div class="datum">
<span>180 KM</span>
</div>
I need value "180 KM". I can't get it to work as this span element doesn't have any name.
Upvotes: 0
Views: 87
Reputation: 474251
Rely on the class
of the parent div
:
//div[@class="datum"]/span/text()
Upvotes: 2