diff --git a/lib/desktoptools.pm b/lib/desktoptools.pm index 3a332722..d50ada3d 100644 --- a/lib/desktoptools.pm +++ b/lib/desktoptools.pm @@ -89,8 +89,8 @@ sub install_application { } assert_screen("gnome_button_open", timeout => $wait_time); # After the installation, return back on the basic screen. - while (! check_screen("software_search_button")) { - assert_and_click("software_back_button"); + if (check_screen("software_back_button")) { + click_lastmatch(); } }