Answer the question
In order to leave comments, you need to log in
How to select the first image in a div using xpath?
Given
Div with the given class containing two pictures
Select first image via xpath
<div class="tovar">
<img src='/bin.aspx?ID=aabbccdd'>
<br>
<img id='img' src="/imgs/buy.gif">
</div>
Such a request does not work, perhaps due to other tags or something else that I cannot describe
//div[@class="tovar"]/img
Therefore, I am interested in how to limit the choice to the first img
Thank you all in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question