I have scenario for verifying the values of two variables.
One variable which contains 150.00
and Second Global variable which contains 150
Both are equal but when I am using Verify Match Keyword then its getting failed.
What should I do!I want to check the contains value.
asuming the global variable is numeric, convert the other one to int.
To further explain on @Ibus 's point. Numbers are just not numbers and 150 compared to 150.00 will fail. You need the same type, be it int, float, double, or decimal.
will look to compare strings. and comparing
150 == 150.00
is like comparing:
Cat == Cat.tt
they don’t match. You could use this:
verify part of it is present, but I would recommend looking for a direct match and like Ibus said convert the one you know is in the format you want.
@sristisharma90 You can search for “BigDecimal” in the forum. There are some topics covering the scenario you shared.
or … convert both of them to string and split by dot, select first field :)))
or, convert the global to float or bigdecimal with two decimals. if the other one is string, convert it too