malj
12 years agoContributor
Disappearing Object Problem
I have automated login to one of our products. After entering the credentials and clicking the login button, the textboxes are emptied. I check if the login view if no longer available. If it is not, we have been logged-in and we can continue. If it is, that is OK because the server may be starting up but I need to re-enter the credentials and click the Login button again to try again.
The problem is that the login view with its text boxes and login button can dissappear any time when I try to do that, since I have clicked the login button. This results in errors which cause my test to stop. Even if I do a check on one line that a textbox exists, I cannot be sure on the next line where I enter text in that textbox, that it still exists.
Any good ideas on how to handle this? The only way I can see is to wait a very long time after clicking the login button (to make sure we are either logged-in or the login view is still available) before checking for the login view's existence.
The problem is that the login view with its text boxes and login button can dissappear any time when I try to do that, since I have clicked the login button. This results in errors which cause my test to stop. Even if I do a check on one line that a textbox exists, I cannot be sure on the next line where I enter text in that textbox, that it still exists.
Any good ideas on how to handle this? The only way I can see is to wait a very long time after clicking the login button (to make sure we are either logged-in or the login view is still available) before checking for the login view's existence.