-1

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)

3.Save

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?

1

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)

0

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, privacy policy and cookie policy

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