Q: Unable to get the values from  tag I should get the values between the p tag.
Following is the code from which i need to get the values 
<div id="ved-list-totals">
<div id="ved-sidebar-totals" class="clearfix margin-top-10" style="height: 100px;">
<div id="ved-sidebar-totals" class="clearfix margin-top-10" style="height: 100px; background-color: transparent;">
<div class="pull-right margin-left-20 margin-right-10 align-right">
<p class="no-margin">0</p>
<p class="no-margin" style="background-color: transparent;">5.97</p>
<p class="no-margin">0.00</p>
<p class="no-margin">4.95</p>
<p class="no-margin bold dark-text">10.92</p>
</div>


<div class="pull-right margin-left-20 align-right">
<p class="no-margin">Estimated Points</p>
<p class="no-margin">Subtotal</p>
<p class="no-margin">Tax</p>
<p class="no-margin">Service Fee</p>
<p class="no-margin bold dark-text">Estimated Total</p>
</div>

I have tried the following approaches:
String tot = driver.findElement(By.xpath("html/body/div[4]/table/tbody/tr/td[2]/div/div[1]/div[2]/div/div/div/div[2]/div/div/div[1]/p[2]")).getText();

String axd = driver.findElement(By.xpath("html/body/div[4]/table/tbody/tr/td[2]/div/div[1]/div[2]/div/div/div/div[2]/div/div/div[1]/p[3]")).getText();

String tot = driver.findElement(By.xpath("//div[@id='ecart-sidebar-totals']/div/p[4]")).getText();

String axd = driver.findElement(By.xpath("//div[@id='ecart-sidebar-totals']/div/p[3]")).getText();

I was getting the error as :

org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//div[@id='ecart-sidebar-totals']/div/p[4]"}

There are two elements with the same id (<div id="ved-sidebar-totals">) should this id be blamed for this error, or is there any thing which am missing.

A: Use the xpath //div[@id='ved-list-totals']//p[1]. This should return the first p tag value with getText() method.

A: Try using Css selector
driver.findElement(By.cssSelector("div[class='pull-right margin-left-20 margin-right-10 align-right'] p:nth-child(4)")); 


A: Wild guess..
//div[@id='ecart-sidebar-totals']/div[@id='ved-list-totals']/p[1]

