title: Selenium Python Using find elements how do i get the text value of each element
body: <p>I am using Selenium Webdriver with Python.
  I have a search results page which displays a list of products.<br>
  I want to loop through the list and print out the text value of the h2 tag.
  E.g. it should print out F1 2015 (PS4)
  I know i should use self.driver_find_elements to get all the elements into a list.
  I should then use a for loop to iterate through and print out it's value.
  My code is not working.  It prints out a list of the representation of the object.  It does not print out F1 2015 (PS4)</p>
  
  <p>This is my selenium python code:</p>
  
  <pre><code> def click_search(self):
      search_field = self.driver.find_element(By.XPATH, '//*[@id="twotabsearchtextbox"]')
      search_field.send_keys("F1")
      search_button = self.driver.find_element(By.XPATH, './/*[@id="nav-search"]/form/div[2]/div/input').click()
      searchresults_text = self.driver.find_elements(By.XPATH, '//div[@class="a-row a-spacing-small"]//a/h2')
      print searchresults_text
      for i in searchresults_text:
          print searchresults_text
  </code></pre>
  
  <p>The html snippet is:</p>
  
  <pre><code>&lt;div class="a-row a-spacing-small"&gt;
  &lt;a class="a-link-normal s-access-detail-page a-text-normal"  href="http://localhost:8080/testurl/i=1437258749&amp;sr=8-1&amp;keywords=f1" title="F1 2015 (PS4)"&gt;
  &lt;h2 class="a-size-medium a-color-null s-inline s-access-title a-text-normal"&gt;F1 2015 (PS4)&lt;/h2&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>The output to the console is:</p>
  
  <pre><code>&lt;selenium.webdriver.remote.webelement.WebElement object at 0x0282F290&gt;,       
  &lt;selenium.webdriver.remote.webelement.WebElement object at 0x0282F2B0&gt;,     
  &lt;selenium.webdriver.remote.webelement.WebElement object at 0x0282F2D0&gt;]
  
  Process finished with exit code 0
  </code></pre>