title: How to find the text of nested div by xpath in Selenium Java?
body: <p>I tried to use this code to find the text of the nested div but I get no text.
  I am trying to get directly to the nested div to avoid any issue in case the development team changes the structure of the site.</p>
  
  <p>I tried to save the text "$89.67 / mo" and save it in a variable but I guess it did not work because the div has a parent div. Also I am trying to get the confirmation number<code>enter code here</code></p>
  
  <p>premium = r.driver.findElement(By.xpath("//div[contains(@class,'amount')]")).getText();</p>
  
  <p>Below is the HTML code and I want to get the text that says $89.67 / mo
  and the confirmation number 442686</p>
  
  <pre><code>          div id="quoteUser" class="row padTop hidden-phone"&gt;
            &lt;div class="span4"&gt;
            &lt;p class="padLeft padTop long-text"&gt;
             vdueiapxibupkdf Testprodquote, &lt;span class="skyblue"&gt;Policy 
             Holder&lt;/span&gt;&lt;br&gt;
              3334 test dr&lt;br&gt;
               City, CA&lt;br&gt;
               Email: test@test.com&lt;br&gt;
               Primary Phone: 254-000-0000
               &lt;/p&gt;
               &lt;p class="padLeft padTop skyblue"&gt;
              Quote date: April 16, 2015&lt;br&gt;
              Confirmation No.: &lt;b&gt;442686&lt;/b&gt;
             &lt;/p&gt;
             &lt;/div&gt;
             &lt;div class="span6 print-block"&gt;
             &lt;div class="quotemedia skyblue"&gt;
              &lt;p class="blue clearfix"&gt;Your Quote for 1 Driver(s), 1 
              Vehicle(s)&lt;/p&gt;
             &lt;div class="amount-container no-bord"&gt;
              &lt;div class="amount"&gt;$89.67 / mo.&lt;/div&gt;
  </code></pre>