Hi
while recording a test case I have used validate statement to validate a quantity value in a table, quantity value is 0.0000, while capturing quantity validation it is showing 0.0000 in the image box but in the property none of the value contain 0.0000 but accessible value and text property values are 0.
while rerunning this script this validation field get error out due to 0 not equal to 0.0000.
please let me know why ranorex not taking 0.0000.
screenshot attached
Thanks in Advance
Madhavan
Decimal points not capturing
-
- Posts: 29
- Joined: Wed Jan 15, 2014 3:32 pm
Decimal points not capturing
You do not have the required permissions to view the files attached to this post.
Re: Decimal points not capturing
The field is being formatted at run-time. The actual value is 0, but it displays it with the trailing ".0000" due to field formatting, which Ranorex can't see.
You will most likely need to write some user code that converts the number into a string with the correct format for you so you can compare it, if you are worried about the formatting.
Or, if you aren't worried about the formatting, you could convert all strings to numbers (float/decimal probably) and compare the numbers, again in user code. 0 == 0.0000 in decimal notations.
You will most likely need to write some user code that converts the number into a string with the correct format for you so you can compare it, if you are worried about the formatting.
Or, if you aren't worried about the formatting, you could convert all strings to numbers (float/decimal probably) and compare the numbers, again in user code. 0 == 0.0000 in decimal notations.
Shortcuts usually aren't...
-
- Posts: 29
- Joined: Wed Jan 15, 2014 3:32 pm
Re: Decimal points not capturing
Thank you for the details, I have added the code for this.
Madhavan
Madhavan