I am generating XPaths server-side for use on the client-side, and I was puzzled as why only table paths (i.e. content in a td
) couldn't be found in the DOM.
Turns out, modern browsers (at least Chrome and Firefox) insert a tbody
tag around table rows upon document loading. See Why do browsers insert tbody element into table elements?
Apart from tbody
, are there other DOM elements I should be aware of when calculating XPaths server-side?