title: Printing desired text using selenium webdriver
body: <p>Below is the HTML Query.</p>
  
  <pre><code>&lt;div id="dvCount" style=""&gt;
    &lt;span&gt;Total Log Count : &lt;/span&gt;
    &lt;span id="spnLogCount"&gt;46&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to print the value <code>46</code> in Selenium WebDriver.  Please let me know the code.</p>
  
  <p>I am using the following code but I am unable to get the value:</p>
  
  <pre><code>WebElement Text= driver.Findelement(By.cssselector(xpath).gettext();
  system.out.println("total" + Text);
  </code></pre>
  
  <p>But this code is not working.  How do I properly get to the value in the "spnLogCount" tag?</p>