Make sure the Esc key is pressed.

This commit is contained in:
Lukas Ruzicka 2023-08-10 11:06:54 +02:00
parent e7af83bdc9
commit 598f08b318
1 changed files with 5 additions and 1 deletions

View File

@ -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,