Reputation: 15
I am using selenium webdriver for automating tests.
I have a set of span elements on a webpage like this .
<span data-template="" data-test-id="20161126092010078480788"
class="">8.2</span>
I want to find all the span elements which have text > 5. Can any one help me build an appropraite xpath for the same?. Note: the data-test-id attribute is same for all the spans
Upvotes: 0
Views: 1749
Reputation: 1
<span class="a-price-whole">79,999</span>
<span class="a-price-whole">89,999</span>
<span class="a-price-whole">59,999</span>
<span class="a-price-whole">76,999</span>
xpath to find amount greater than 75000:
//*[number(translate(., ',', '')) > 75000]
output:
79999, 89999, 76999
Upvotes: -1