getting the raw source from Firefox with javascript getting the raw source from Firefox with javascript selenium selenium

getting the raw source from Firefox with javascript


XHR request the same page for the source, and just check document.documentElement.outerHTML || document.documentElement.innerHTML for the current state's source.


Have you tried something as simple as

document.documentElement.innerHTML;


Since you are also using selenium, you can use selenium.getHTMLSource(). This will return the whole source page contents.