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 .

posted @ 2017-03-01 20:56  chen狗蛋儿  阅读(107)  评论(0编辑  收藏  举报