xpath can help you when contains does not work!
Look at the following text
Expected - En savoir plus sur l'aide avec un fauteuil roulant à l'aéroport.
Actual - En savoir plus sur l'aide avec un fauteuil roulant à l'aéroport.
I tried using contains - could not find the french content
But when I used xpath to point to the actual content no issues there!
So sometimes contains may not work and you will have no choice but to use xpath
Spent my whole morning and this one really baffles me
Relative XPATH has made my life a bit easier.
Let's say you have the following XML Structure
<Parent>
<Child1>
<DataPiece>A</DataPiece>
</Child1>
<Child2>
<DataPiece>B</DataPiece>
</Child2>
<Child3>
<DataPiece>C</DataPiece>
<DataPiece2>1</DataPiece2>
</Child3>
</Parent>
Let's say you want Child3, DataPiece2.
Normally you have to use //Parent/Child3/DataPiece2. That's listing out the entire XPATH from start to finish. That can get cumbersome really quickly.
A relative xpath would instead be
//DataPiece2
This is really helpful, but you have to be careful in your response that DataPiece2 doesn't show up at multiple levels.
Does that help at all?