title: How can I get the current contents of an element in webdriver
body: <p>I must be thinking about this wrong. </p>
  
  <p>I want to get the contents of an element, in this case a formfield, on a page that I am accessing with Webdriver/Selenium 2</p>
  
  <p>Here is my broken code:</p>
  
  <pre><code> Element=driver.find_element_by_id(ElementID)
   print Element
   print Element.text
  </code></pre>
  
  <p>here is the result:</p>
  
  <pre><code>&lt;selenium.webdriver.remote.webelement.WebElement object at 0x9c2392c&gt;
  </code></pre>
  
  <p>(Notice the blank line)
  I know that element has contents since I just stuffed them in there with the previous command using .sendkeys  and I can see them on the actual web page while the script runs. </p>
  
  <p>but I need to get the contents back into data.</p>
  
  <p>What can I do to read this?  Preferably in a generic fashion so that I can pull contents from varied types of elements.</p>