I'm using the latest version of Selenium and the chromedriver
to test a ZK application.
During the test, I'd like to dump the DOM (or part of it) to help me find the elements I need (and probably help people who have to maintain the test).
The method WebDriver.getPageSource()
looked promising but it only returns the HTML as it was sent by the server, not the result after running all the JavaScript code.
The JavaScript code is run; I can find elements by ID that I can't see in the output of getPageSource()
. So I tried WebElement.getText()
but that is only the text of the elements, not the elements themselves or their attributes.
Is it possible at all to get the DOM or do I have to do keyhole surgery here?