Wait until the testing window is correctly closed