So I have test case like this: User input Money value, then Discount value will be calculated automatically, user save the data.

1.Money : 1.000.000

2.Discount: 10 (Automatically calculated -> Budget/100.000)


I want to automated a lot of data, but when I use:

Command: Type

Target : id=Money

Value : 1.000.000

Command: Click

Target : id=Save

Value :

My test case immediately Save the data before Discount value calculated, what command should I use to get Discount value calculated first before click Save?

2 Answers 2


You could use the waitForElementPresent command befaroe saving the calculated value.

Use for pointing to the input field not only the id in a XPath, but also that value should not be null.

//input[@id='Save' and not @value='']

(not 100% sure if this xpath is correct)


You have to wait for few seconds till your discount get calculated, SO please use below codes.

Command: pause Target: 5000 -(From miliseconds as i can remember.) Value:

Or use below link : http://www.software-testing-tutorials-automation.com/2012/11/pause-refresh-and-waitforpagetoload.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.