Run a process and wait for the Sucess text display
I have a scenario in the application where I have to Click on the "process" button , but I have to click refresh button and wait to see when the status of the process changes to the "Success" and then go the next page. I am not sure how many times I have to click on the refresh button. But will have to wait until the process is success.
Re: Run a process and wait for the Sucess text display
Here is some logic that should do what you want without writing a bunch of failed tests to the log while you're waiting for the process to report success. It also has a maximum number of attempts so it doesn't go into an infinite loop. Tweak as you see fit.
<font class="small">Code:</font><hr /><pre>
maxAttempts = 5
attempts = 0
processSuccess = false
while attempts <= maxAttempts AND not processSuccess
' since i don't know exactly how to get the label, i leave that to you
if label = "Success"
processSuccess = true
attempts = attempts + 1