I'm using Java with the Selenium Library to scrape a webpage. When I use Firebug on the page in Firefox, I can see that the page's source contains the following HTML structure:
<div>
<div>
<table>
<caption />
<thead />
<tbody />
</table>
</div>
</div>
However, when I programatically download the page's source using HtmlUnitDriver, then use driver.getPageSource(), I see that the corresponding HTML structure has changed to:
<div>
<table>
<caption />
<tbody />
</table>
</div>
- Why does the HtmlUnitDriver's report differ to that given by Firebug?
- Can I set up firebug so that I can inspect the HTML structure according to how the HtmlUnitDriver will report it?