I have here a test script that allows automatic betting on a user account. My test scripts says successfully executed but my concern is whenever I run the script , the amount stake should be added automatically on the user portal (since the scripts is successful) , but upon checking the amount(active bets) it is not added or did not reflect in the portal. Im not sure why, do I need to add another statement or something wrong with my test script? Please advise.
Anyone can help me correct this one? Im still exploring this tool. Any reply would be much help and is highly appreciated.
don’t you need also to click on confirm button on the end?
also try to incorporate some checks (asserts) to see if script is doing what it should do…
and instead of delays try to use waitFor functions (they can provide additional checks and speedup whole execution)
Hello Sarah ,
You can be sure by checking that the text content on the page is located on the page.
For example, you can test whether the text expressing the amount of on the page changes with verify statements.
WebUI.verifyNotTextPresent ("Total Stake: $ 25", false)
if you verify that this expression is not on the page, it means that the amount has increased.
Or the amount that should increase is for example $ 5:
WebUI.verifyTextPresent ("Total Stake: $ 30", false)
if you verify that the expression is on the page, it means that the amount has increased.
If you want to get more information for verify keywords, see the article below.
Hi, yes I need to click confirm also in the end. I’ll try your suggestion and let you know the result once done. Thank you for taking time replying my question