title: Selenium WebDriver getText
body: <p>I have a <code>&lt;div name=&quot;myDiv&quot;&gt;0&lt;/div&gt;</code>.</p>
  <p>I try to write a test that myDiv has <strong>0</strong> text in it. With WebDriver it is:</p>
  <pre><code>String text = webDriver.findElement(By.xpath(&quot;//div[@name='myDiv']&quot;)).getText();
  </code></pre>
  <p>But in the result I have an empty string. Shouldn't I use getText() for getting a content of a div?</p>