Answer the question
In order to leave comments, you need to log in
Where is the error in my XPath selector?
Hello. There is such an XPath selector:
//div[contains(@class,"wrapper")]//tr[contains(@class,"table__row") and .//span[contains(@class, "campaign-info-number") and contains(text(),'302177')]]
Answer the question
In order to leave comments, you need to log in
And in what language and with what library is this problem? Usually, by default, libraries are searched only for a simple xpath, and separate methods are used to calculate such expressions, and support for structures is not always complete, because, for example, either xpath 1.0 support may be available, and you use expressions from xpath 2.0
XML
<div>
<div class="asdf wrapper">
<table>
<tr class="table__row">
<td>
<span class="campaign-info-number">302177</span>
</td>
</tr>
<tr class="table__row">
<td>
<span class="campaign-info-number">302178</span>
</td>
</tr>
<tr class="table__row">
<td>
asdf
</td>
</tr>
</table>
</div>
</div>
<tr class="table__row">
<td>
<span class="campaign-info-number">302177</span>
</td>
</tr>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question