I want to read the page's source code after it has changed due to some ajax requests. Since I'm running out of ideas, I tried JavaScript, but the executeScript()
function always returns null. Any help would be much appreciated.
I use the FirefoxDriver
. My code looks as follows:
Object test = ((JavascriptExecutor) firefox).executeScript("function getHTML(){ return document.body.innerHTML;} getHTML();");
System.out.println(test);