Basically, if you think about how you do test manually, you go through checks.
For the example you gave, as a manual tester, you first make a note of the current balance. You then perform the action. Then you make a note of the ending balance. Then you subtract one from another. Then you check to see if that result = 100.
Translate that into an automated test.
1) Make note of the current balance -> Create a variable in your test and store the contents of the property of the on-screen component that contains the balance into that variable.
startingBalance = Aliases.myApp.myForm.customerBalance.wText
2) Run the test
3) Record the ending balance after the test
endingBalance = Aliases.myApp.myForm.customerBalance.wText
4) Subtract the values and store the difference -> You'll need to convert the string on screen to an integer and subtract. Of course, if there are special symbols like $ or something for currency, you may need to peel those out. But, generically.
5) Now, check that difference for the desired amount.
if (balanceDifference = 100) then Log.Message("The test passed")
else Log.Error("The test failed")
Your job, as an automated tester, is to translate what you do in manual tests into code. What I've described above probably has some fine tuning that you could do to it, you could use property checkpoints in some way as well, but effectively, that's how you write an automated test.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.