I have two fields, Lodging Base and Lodging Tax. Their Object’s Property “type” equals text, even though the user is only allowed to enter numeric values. After either field loses focus, a dollar sign with a space before the numbers is added to the field.
…the result in the field is lodging: $116.33000000000001.
In my newbie attempts to fix all of those extra decimal places, I’ve tried the below two shots at it, but to no avail to get the answer to also be two decimal places. Any suggestions?
lodgingTotal = lodgingBase + lodgingTaxes as Double
lodgingTotal = (lodgingBase + lodgingTaxes) as Double
…and that worked perfectly. But, it just so happened that after I implemented that fix, I updated my Java SDK to 12.0.2. After the update, the above code change didn’t work, with the reason shown as:
groovy.lang.MissingMethodException: No signature of method: java.math.BigDecimal.round() is applicable for argument types: (java.lang.Integer) values: [2]
Possible solutions: round(java.math.MathContext), find(), pow(int), find(groovy.lang.Closure), mod(java.lang.Number), and(java.lang.Number)
I went through the suggested link provided by @kazurayam, resulting in changing the code line to
@hhomberg katalon does not suport java greater than 8. aka 1.8.xx. at all. so … why would you want to try java 12 with it?
doing that you are on your own,nobody will take a look into an unsuported code …