Well, as a more targeted example, I can use the xpath
"//div[1]/li//li[1]/a[1]" to target the element I want. This evaluates
exactly how I'd expect when using webtest recorder, so I assume that my
xpath is proper (syntactically at least). But this very same xpath results
in a failure in webtest. I can go to the saved page linked in the webtest
report and the xpath works in both xpather and the xpath tool in webtest
recorder. Even the simplest of xpaths, such as "//a" or //div" fail in
webtest but not in xpather or the xpath tool in webtest recorder. After
putting the page through htmltidy, it was a little closer to valid, though I
still got the same behavior with valid xpaths failing in webtest. Could
valid xpaths failing in webtest be the result of non-compliant html?