- You only need 1 from selenium import webdriver .
- Execute 1 html= browser.find_element_by_xpath(".//html") to get the html element on the page, the largest element. (You can do this any number of ways, and select any number of elements. )
- Execute
html.text
to return the text of the page.
.text
is a method of an element object. Step 2 is the assignment of the element to the name html .