Hi *,

I'm using verifyXPath to check for a link like this :

<verifyXPath xpath="//img[contains(@src/text(),'/#{userId}.jpg')]" />

This function failed but should not, according to HTML result stored by
previous step :

<img width="100" height="100%" style="max-width: 100px;
max-height:100px;" src="/img/avatars/553.jpg" alt="553" /></a>


WebTest (R1705 and R1706) return error on this step verifyXPath as follow :


Error

Message

xpath test: //img[contains(@src/text(),'/553.jpg')] matched no nodes


Now, just modifying verifyXPath and removing the '/' before #{userId}
and test pass successfully... This is working, but to avoid true false,
I'd like to use "/img/avatars/#{userId}" in my xpath.
I check again (one more) against HTML source, but as you could see, a
'/' must matched too !

Does anybody knows where I made mistake ?

Regards,
David.
--

Reply via email to