title: How to get text of td element using selenium?
body: <p>I have an html table. I need to get the text of a td element with selenium.</p>
  
  <p>Html structure:</p>
  
  <pre><code>&lt;table id="myTable"&gt;
      &lt;tbody&gt;
       &lt;tr&gt;
        &lt;td&gt;
         &lt;b&gt;Success: &lt;/b&gt;
         You have transferred 1,000.00 USD to DIST2. Your balance is now 19,979,000.00 USD.  ref: 2017011806292760301000301
        &lt;/td&gt;
       &lt;/tr&gt;
       &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>I tried using <code>driver.findElement(By.xpath("//table[@id='myTable']/tbody/tr/td")).getText();</code></p>
  
  <p>It is returning blank string. I need to get "You have transferred 1,000.00 USD to DIST2. Your balance is now 19,979,000.00 USD.  ref: 2017011806292760301000301" from it. I think the td element contains a  tag that is why it is not returning the value.</p>
  
  <p>Is there any way to fetch the value?</p>