Calculate value of variable using parameter default value and an on-scree object variable value
I have a parameter (InvoiceAmount),which has a default value of 1000. I have a variable (discount),whose valueI get from an on-screen object. I need to calculate the value of Amount (which is another vaiable). I need this value to be stored and entered into the text field of another on-screen object. The calculation is simple - Amount = Invoice Amount - Discount. I am not sure how to reference parameters and variable in VBScript. I keep getting an error that it is not running the test. I also tried 'Run Code Snippet' with value as Execute(KeywordTests.MY_Test.Parameters.Invoice_Amount - KeywordTests.MY_Test.Variables.Discount_Amount). However, it just enters this string as the value into the on-screen, text field instead of the calculated value. Any help or suggestions would be greatly appreciated. Deepa.Solved3.2KViews0likes7Comments