//form[@id='myFormName']/table/tr[2]/td[2]
My test failed, reporting that this expression didn't return any value at all. I verified this was the correct path by looking at the XHTML source. It was only through inspecting the XHTML using the Firebug plugin for Firefox did I see a mystery <tbody> tag. I'm not sure at which point that gets injected, or even why. The injection appears to be a misinterpretation of XTHML 1.0 strict (the specified DOCTYPE). When I added the <tbody> tag to the XPath expression -- which I remind you is not in the XHTML source -- the test passed. Here is the working expression:
//form[@id='myFormName']/table/tbody/tr[2]/td[2]
I haven't figured out what I'm missing, yet.
No comments:
Post a Comment