Skip to content Skip to sidebar Skip to footer

Get Current Html Of Rendered Page Using Selenium

I'm strugling to get the rendered html code in selenium of a facebook app. After login I go to the app page and use time.sleep(20) to wait for it to fully render. I have already tr

Solution 1:

self.driver.find_element_by_xpath("//body").get_attribute('outerHTML')

...and don't use time.sleep(). Use a WebdriverWait and wait for a unique element on the page to load.


Post a Comment for "Get Current Html Of Rendered Page Using Selenium"