Whenever there are long series of tests, there is a possibility that one test fails and leave the application in an unwanted condition, that is a modal window stays open or the app crashed.
To help deal with these proplems, create a step that will check is the app is started, if not start it, if already started, close any modal window.Testxx
UA.CheckApps()
LaunchAppName()
…
LaunchAppName
if AppName.WaitUntilExist(0,none)
// the app is not present, start it
AppName.Start() or System.Run (“AppName.exe, Path”)
else
// the app is present, it was not closed by the previous test but may be stuct with a modal window opened
step CloseAnyModalWindow()
CloseAnyModalWindow
if GenericDialogBox.WaitUntilExists (0, NotExistAction.None)
GenericDialogBox.OK.Click ()
LogWarning (“Incorrect user name or password, verify previous test for failures”)
…
Contact Our Team