From 598f08b318ac4b4c542c6d23790bb82ac2904551 Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Thu, 10 Aug 2023 11:06:54 +0200 Subject: [PATCH] Make sure the Esc key is pressed. --- tests/desktop_login.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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,