Python Selenium 'WebDriver' object has no attribute error Python Selenium 'WebDriver' object has no attribute error selenium selenium

Python Selenium 'WebDriver' object has no attribute error


  1. You only need from selenium import webdriver.
  2. Execute 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. )
  3. 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.