I use Copy Xpath
function in Chrome developer tools for nokogiri
xpath parser.
But like this question, Chrome and Firefox's Developer tools insert tags like <tbody>
implicitly.
Is there a way to get "real" xpath that I can use for nokogiri
xpath parser?
When you extract XPath from a browser, you do that form the actual DOM, where it is too late to know whether the
<tbody>
element was there or whether it was added implicitly.You can replace all instances of
/tbody/
with//
so you don't care which case is it: