I'd like to get a reference to the DOM tree (preferably the org.w3c.dom.Document
) in order to be able to log the DOM tree in functional tests on a CI service. Search results point to NoClassDefFoundError
s and usage tutorials, but nothing related to the question.
Please note that I'm not looking for a way to retrieve the page source, but the DOM tree including eventual changes after page load since
Get the source of the last loaded page. If the page has been modified after loading (for example, by Javascript) there is no guarantee that the returned text is that of the modified page.
(from WebDriver.getPageSource
Javadoc).