Answer the question
In order to leave comments, you need to log in
How to get list from xpath?
Hello everyone, there was such a problem. Need to get data from div block using xpath
<div class="reports">
<div class="ERROR">
<div class="name"></div>
<div class="author"></div>
</div>
<div class="SUCCESS">
<div class="name"></div>
<div class="author"></div>
</div>
<div class="SUCCESS">
<div class="name"></div>
<div class="author"></div>
</div>
<div class="ERROR">
<div class="name"></div>
<div class="author"></div>
</div>
<div class="SUCCESS">
<div class="name"></div>
<div class="author"></div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Good afternoon.
You probably meant "get the values inside a div with class = name".
You almost wrote the required xpath yourself. If in the forehead, then:
this is for name inside SUCCESS
this is for author inside ERROR
//div[@class="reports"]/div[@class="ERROR"]/div[@class="author"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question