Finding Xpath - for text without HTML tag




<p class="result-price">
<span>Price</span>
$25.00 |
<span>Member Price</span>
$25.00
<span>(0% discount)</span>
</p>
<p class="result-rating">


From the above HTML tags u can notice that the $25.00 | is just a text and is not associated with any HTML tags, I wrote the following x-path to retrieve it :


//div[contains(@data-title,'Rafael B.: Arrangement and Composition')]/div[3]/p[1]/text()[2].


and it did extract the text but in the xpath checker the result is displayed inside a container. when I use the same x-path in my script, its not retrieving the text value.


Can somebody please help.Looks like the text is inside a container/ text-area


No comments:

Post a Comment