webdriver 选择

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

原文地址:https://www.cnblogs.com/cymwill/p/6486271.html