get html text selenium code example
Example 1: selenium python get innerhtml
element = driver.find_element_by_xpath('//*')
element = element.get_attribute('innerHTML')
Example 2: get text selenium
add ".text" to the end of the finding element function, so for example,
to get the text from something like :
browser.find_element_by_xpath('Insert xpath')
you do:
browser.find_element_by_xpath('Insert xpath').text
Example 3: python selenium get html content
element.get_attribute('innerHTML')