From 44a964bb3847c2d991cb087891c91c7381c6de7e Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Wed, 22 Mar 2023 11:04:58 +0100 Subject: [PATCH] Update library. --- lib/desktoptools.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/desktoptools.pm b/lib/desktoptools.pm index 94a2831f..3a332722 100644 --- a/lib/desktoptools.pm +++ b/lib/desktoptools.pm @@ -68,14 +68,6 @@ sub check_application_information { # you need to start it before running this. sub install_application { my ($application, $source) = @_; - # Sometimes, especially when this method is used several - # times in a row, Software can be located on the - # installation tab and we need to leave it until - # we can proceed. - if (check_screen("software_back_button")) { - click_lastmatch(); - } - # For some applications, there are more installation sources # available. Pick the desired one. if (check_screen("software_sources_available", timeout => 5)) { @@ -96,6 +88,11 @@ sub install_application { $wait_time = 1200; } 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"); + } + } # This subroutine opens the $application using Gnome Software.