title: Verifying text between <div> using Selenium
body: <p>I need to verify whether specific slot on webpage is loaded or not. I am using Selenium WebDriver in <code>main()</code> function for that (should I use a JUnit test case?).</p>
  
  <p>What are ways to retrieve text between any <code>&lt;div&gt;</code> having a specific id?</p>
  
  <p>If given <a href="http://ideone.com/TK8Mk" rel="nofollow">this page</a>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="center-2" class="promo"&gt;
      &lt;div class="unified_widget rcmBody"&gt;
          &lt;span class="logo"&gt;&lt;img src="someimage.gif" /&gt;&lt;/span&gt;
          &lt;span class="headline"&gt;Make money by Selling items on Amazon&lt;/span&gt;
          &lt;span class="link"&gt;&lt;a href="/content/sell-on-amazon.htm"&gt;Selling On Amazon&lt;/a&gt;&lt;/span&gt;
          &lt;span class="body"&gt;Sell your items on Amazon.com. Amazon can help you grow your business and reach more customers.&lt;/span&gt;
          &lt;div class="h_rule"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>when <code>&lt;div id = center-2&gt;</code> is given, I need to extract</p>
  
  <p>"Make money by Selling items on Amazon",<br>
  "Selling On Amazon",<br>
  "Sell your items on Amazon.com. Amazon can help you grow your business and reach more customers."</p>
  
  <p>Which method should I use?</p>