You can handle this in the recovery state or the testcaseexit. Just do a check if the expected window is active or not. If not then get the Desktop.Active window and call te close method for that window. I have done it and it works well.
↧