I'm wondering if there is any way to easily retrieve text that is sandwiched between two child elements with text? In this particular case, I'm looking to extract the text USD
.
<div class="indemandProgress-raised ng-binding">
<span class="indemandProgress-raisedAmount ng-binding" gogo-test="raised">
$6,811,034
</span>
USD
<span class="ng-binding">
total funds raised
</span>
</div>
Actual Format of Code in Browser
<div class="indemandProgress-raised ng-binding">
<span class="indemandProgress-raisedAmount ng-binding" gogo-test="raised">$6,811,034</span> USD <span class="ng-binding">total funds raised</span>
</div>
Is this possible with XPATH alone or would I have to extract all of the text and then parse it?
It has to work with Selenium.