Actually, I don't think I have it correct. I think what I thought was correct just evaluates to true regardless of it should, since I cannot set a checkbox doing it that way.
________________________________ From: Soula, William Sent: Tuesday, July 08, 2008 1:04 PM To: [email protected]; Soula, William Subject: RE: [Webtest] New XPath Of course after I email the list I figure it out. If I changed the second verifyXPath to wt:cleanText(td='WATIR') it works correctly. So the correct verifyXPath is: <verifyXPath xpath="//tr[wt:cleanText(td='WATIR')]"/> I was going off Marc's post that said: - spaces are not trimmed in text ex: if the text of the above td is " 2.1", the XPath expression should be changed to //tr[td/text() = ' 2.1']. Alternatively you can use the wt:cleanText function //tr[wt:cleanText(td) = '2.1'] and his example wasn't working for me. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Soula, William Sent: Tuesday, July 08, 2008 12:42 PM To: [email protected] Subject: [Webtest] New XPath I have been trying to upgrade to the latest version of webtest and xpath has been giving me much trouble. I think I have got it down to this problem: <verifyXPath xpath="wt:cleanText(//tr[td='WATIR'])"/> -> Works <verifyXPath xpath="//tr[wt:cleanText(td)='WATIR']"/> -> Doesn't Work Why are these two xpaths evaluating differently? The reason I want to know is that I'm trying to verify the preceding sibling checkbox is checked and I can't wrap the whole xpath in wt:cleanText, because "The xpath doesn't select an Element: 'class java.lang.String'". Source code below: <html> <head> <title>Planning</title> </head> <table id="resourceSelectionTable" class="data"> <tr> <td><input type="checkbox" name="selectedResources" value='1' onClick="resourceCheckboxEventHandler()" checked></td> <td>WATIR</td> </tr> </table> </body> </html>

