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>