I have an operation in my web application that takes a long time (i.e. approx. 25mins)
When it completes I will get a status message of "Running" or "Provision Failed" in my web application.
How can I wait for the text "Running" or "Provision Failed" I am currently using hardcoded waits?
You can appreciate the disadvantages of doing that:
1. Sometimes it takes 23mins not 25mins
2. Sometimes (i.e. rarely) I might get "Provision Failed" so need to needless wait.
Use an assert but have a wait parameter for that element to appear.
Currently, the assert waits a max of 30 secs.
Also, your hardcoded wait has a max of 180secs. I needed to use 7 of these and 1 60sec wait.