Reputation: 85
How can I get get the 'Text One' text with an XPATH that say: 'Get the div that has a span with text ='Type1' or 'Get the div that has a span with class ='class2' ?
<div>
<div class='Row'>
<span class='class1'>'Type1'</span>
<span>'Text One'</span>
</div>
<div class='Row'>
<span class='class2'>'Type2'</span>
<span>'Text Two'</span>
</div>
</div>
EDIT: And in that case what should I do?
<div>
<div class='Row'>
<div>
<span class='class1'>Type1</span>
</div>
<span>Text One</span>
</div>
<div class='Row'>
<div>
<span class='class1'>Type1</span>
</div>
<span>Text Two</span>
</div>
</div>
I still want to get 'Text One' or 'Text 2'
Upvotes: 0
Views: 58