title: Extract text from webpage with Selenium
body: <p>I am attempting to extract IP addresses from a webpage using the following code (snippet). </p>
  
  <pre><code>IPs = driver.find_elements_by_xpath("//span[contains(text(), '10.')]")
  print(IPs)
  </code></pre>
  
  <p>The HTML element(s) look like this:</p>
  
  <pre><code>&lt;span style="padding: 1px 4px;float:left;"&gt;10.20.20.20&lt;/span&gt;
  </code></pre>
  
  <p>Inspect >> Copy Xpath returns:</p>
  
  <pre><code>//*[@id="T1700010887"]/tbody/tr[2]/td[1]/nobr/span
  </code></pre>
  
  <p>But all my code prints is what looks like generic selenium code:</p>
  
  <pre><code>[&lt;selenium.webdriver.remote.webelement.WebElement (session="7885f3a61de714f2cb33
  b23d03112ff2", element="0.5496921740104628-2")&gt;, &lt;selenium.webdriver.remote.webe
  lement.WebElement (session="7885f3a61de714f2cb33b23d03112ff2", element="0.549692
  1740104628-3")&gt;, &lt;selenium.webdriver.remote.webelement.WebElement (session="7885
  f3a61de714f2cb33b23d03112ff2", element="0.5496921740104628-4")&gt;]
  </code></pre>
  
  <p>How can I get it to print the actual IP of 10.20.20.20?</p>