So for my test I need to do an aggregation of several amounts of money.
I can loop, sort of janky, over all lines and get the value attribute.
Now I need to add these decimal numbers/float together.
When I try the simple addition I get a java.lang.NumberFormatException: For input string: “69.83”
First time around the number to be added too is 0.0
Add 69.83 to 0.0
Each line should add it’s number to the previous number.
The aggregation will be stored in a project parameter, while the value attribute with the amount will be stored in a test parameter.
Since this is not code, how can I discover the datatypes of both parameters and convert them to the correct type for adding?
I tried converting both to a number ( Remove none numeric characters from 69.83 ) and ( Remove none numeric characters from 0.0 )
So both would be numeric so I can add them together.
But Computer says No.
Question 1: How to discover the datatype of a parameter
Question 2: How to convert 2 parameters to Float