diff --git a/tests/_graphical_wait_login.pm b/tests/_graphical_wait_login.pm index 27f22466..c7b04798 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -46,8 +46,10 @@ sub run { # GDM 3.24.1 dumps a cursor in the middle of the screen here... mouse_hide; if (get_var("DESKTOP") eq 'gnome') { - # we have to hit enter to get the password dialog - send_key "ret"; + # we have to hit enter to get the password dialog, and it + # doesn't always work for some reason so just try it three + # times + send_key_until_needlematch("graphical_login_input", "ret", 3, 5); } assert_screen "graphical_login_input"; # seems like we often double-type on aarch64 if we start right diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index 5934347d..296dc4f2 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -60,8 +60,10 @@ sub run { # GDM 3.24.1 dumps a cursor in the middle of the screen here... mouse_hide; if (get_var("DESKTOP") eq 'gnome') { - # we have to hit enter to get the password dialog - send_key "ret"; + # we have to hit enter to get the password dialog, and it + # doesn't always work for some reason so just try it three + # times + send_key_until_needlematch("graphical_login_input", "ret", 3, 5); } assert_screen "graphical_login_input"; type_very_safely get_var("USER_PASSWORD", "weakpassword");