Forum Discussion
Thanks Marsha.
It still is not giving me the calculated value, and does not enter any value into the field.
Discount_Amount and Bank_Amount are local variables.
But, Invoice Amount is a parameter, local to the test.
I have it now as:
Run Code Snippet Bank_Amnt = aqConvert.StrToInt(Invoice_Amount) - aqConvert.StrToInt(Discount_Amount)
Object SetText KeywordTests.My_Test.Variables.Bank_Amnt (also tried it as just Bank_Amnt)
See attached screenshots. I wrote the total into a remarks field that's text so you can see the layout. If you still aren't seeing the correct calculations, put log messages at the top and display each one of the variables so you can see what the values are at the beginning.
- DeepaJ10 years agoContributor
Marsha, what you have described seems to be the right solution and I have my test steps exactly like yours. However, it is still giving me a null or 0 as calculated result. When I log it, it returns empty message. On my screen, it seems to enter a null value.
I've attached the screenshot of the log.
- Marsha_R10 years agoModerator
See attached screenshot. Use messages like this right before the calculation and right after to display the variables and parameter so we can debug.
- DeepaJ10 years agoContributor
Thanks a ton Marsha. It works now. My problem was that it was not grabbing the Discount value correctly from the screen. That was null and hence it was calculating incorrectly.
Appreciate your help!
Related Content
- 6 years ago
- 4 years ago
- 8 years ago
Recent Discussions
- 2 days ago