I got in my site several amounts of money displayed like this: $5,000 I want to sum all of them and to check some variables. How can I parse and get the number 5000 and use it as a number (summing up, multiplying etc) using Selenium IDE?
1 Answer
You can use storeEval and parse the string into the Number using javascript:
<tr>
<td>storeEval</td>
<td>Number('$5,000'.replace(/[^0-9\.]+/g,""));</td>
<td>amount</td>
</tr>
<tr>
<td>echo</td>
<td>${amount}</td>
<td></td>
</tr>