I have been using python selenium for web automation testing. The key part of automation is to find the right element for a user-visible object in a HTML page. The followin
Try:
find_elements_by_xpath("//*")
That should match all elements in the document.
UPDATE (to match question refinements):
Use javascript and return the DOM as a string:
execute_script("return document.documentElement.outerHTML")