diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index 4f08a1e5..789bd6b9 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -234,7 +234,11 @@ sub run { # Try to log in with either account, intentionally entering the wrong password. login_user(user => "jack", password => "wrongpassword", checklogin => 0); # get back to the login screen if necessary (dismiss an error message) - send_key 'esc' unless (check_screen "login_jim"); + my $counter = 5; + while (! check_screen("login_jim")) { + last if ($counter <= 0); + send_key("esc"); + } # Now, log into the system again using the correct password. This will # only work if we were correctly denied login with the wrong password,