How to get the HTML source of a web element in Selenium WebDriver using Python?
Hey NoahSmith,
You can read innerHTML attribute to get source of the content of the element or outerHTML for source with the current element.
Python:
element.get_attribute(‘innerHTML’)
Java:
elem.getAttribute(““innerHTML””);
C#:
element.GetAttribute(““innerHTML””);
Ruby:
element.attribute(““innerHTML””)
JS:
element.getAttribute(‘innerHTML’);"