selenium print html
snippet in html

selenium print html

user4963

element.get_attribute('innerHTML')

selenium python get innerhtml

user3349

element = driver.find_element_by_xpath('//*')
element = element.get_attribute('innerHTML')

python selenium get html content

user841

element.get_attribute('innerHTML')

selenium print html

user9329

elem = driver.find_element_by_xpath("//*")
source_code = elem.get_attribute("outerHTML")