Skip to content Skip to sidebar Skip to footer

Java Selenium, Storing Updated Page Source After Javascript Activation

I have managed to open a browser with my link and activate the javascript, which allows the page to display more results. Once this is done I am trying to print the new updated pag

Solution 1:

You have to get attribute "innerHTML" of body instead of pageSource:

String bodyHtml = driver.findElement(By.tagName("body")).getAttribute("innerHTML");

Post a Comment for "Java Selenium, Storing Updated Page Source After Javascript Activation"