title: How to gettext() of an element in Selenium Webdriver
body: <p>I am finding a textbox by its ID. I need to get the content which is already there inside the text box. For that I am using the <code>gettext()</code> method, but it is returning the ID value.</p>
  <p>The content in the text box is: <em>Santhosh</em></p>
  <p>The output I am getting is = <code>[[FirefoxDriver: firefox on XP (c0079327-7063-4908-b20a-a606b95830cb)] -&gt; id: ctl00_ContentPlaceHolder1_txtName]</code></p>
  <p>The code is below</p>
  <h3>Code</h3>
  <pre><code>WebElement TxtBoxContent = driver.findElement(By.id(WebelementID));
  TxtBoxContent.getText();
  System.out.println(&quot;Printing &quot; + TxtBoxContent);
  </code></pre>
  <h3>Result</h3>
  <pre><code>Printing [[FirefoxDriver: firefox on XP (c0079327-7063-4908-b20a-a606b95830cb)] -&gt; id: ctl00_ContentPlaceHolder1_txtName]
  </code></pre>