I have this HTML:
<div class="item-cost">
<a data-passage="Shop" class="link-internal macro-link" tabindex="0" id="Link1">$10 <sup>1</sup></a>
</div>
I am writing this testcafe code to get the cost:
.expect(Selector('.item-cost').nth(0).innerText)
.eql('$1')
This fails because the inner text is $11, not $1. The reason it's failing is because the contents of the sup element are included in the inner text. Is there any way I can modify the selector above so that it gives me the inner text without including the sup element? I cannot modify the HTML.