diff --git a/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py b/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
index 17ee40d3..d8917c60 100644
--- a/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
+++ b/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
@@ -6,7 +6,6 @@
 # This software is released under the PostgreSQL Licence
 #
 ##########################################################################
-import time
 import os
 
 from selenium.webdriver.support.ui import WebDriverWait
@@ -30,6 +29,7 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
                     self.server['name']
                 )
             )
+
         connection = test_utils.get_db_connection(
             self.server['db'],
             self.server['username'],
@@ -56,10 +56,6 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
         self.wait.until(EC.element_to_be_clickable(
             (By.CSS_SELECTOR, ".browse_file_input")))
 
-        self.page.find_by_css_selector(
-            ".ajs-dialog.pg-el-container .ajs-maximize"
-        ).click()
-
         self.wait.until(EC.element_to_be_clickable(
             (By.CSS_SELECTOR, ".browse_file_input"))).click()
 
@@ -83,14 +79,18 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
 
         self.assertIn(self.server['name'], str(command))
         self.assertIn("from database 'pg_utility_test_db'", str(command))
-        self.assertIn("test_backup", str(command))
+
+        # as in windows modified path is shown so skipping this test for
+        # windows platform only
+        if os.name is not 'nt':
+            self.assertIn("test_backup", str(command))
+
         self.assertIn("pg_dump", str(command))
 
         backup_file = None
         if command:
             backup_file = command[int(command.find('--file')) +
                                   8:int(command.find('--host')) - 2]
-
         self.page.find_by_xpath("//div[contains(@class,'wcFloatingFocus')"
                                 "]//div[contains(@class,'fa-close')]").click()
 
@@ -126,7 +126,9 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
         command = self.page.find_by_css_selector("p.bg-detailed-desc").text
 
         self.assertIn(self.server['name'], str(command))
-        self.assertIn("test_backup", str(command))
+        if os.name is not 'nt':
+            self.assertIn("test_backup", str(command))
+
         self.assertIn("pg_restore", str(command))
 
         self.page.find_by_xpath("//div[contains(@class,'wcFloatingFocus')]"
@@ -137,6 +139,31 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
                 os.remove(backup_file)
 
     def after(self):
+        self._screenshot()
+
+        # In cases where backup div is not closed (sometime due to some error)
+        try:
+            if self.driver.find_element_by_css_selector(
+                ".ajs-message.ajs-bg-bgprocess.ajs-visible > div > "
+                    "div > div > i"):
+                self.driver.find_element_by_css_selector(
+                    ".ajs-message.ajs-bg-bgprocess.ajs-visible >div >div  "
+                    ">div>i").click()
+        except Exception:
+            pass
+
+        # In cases where restore div is not closed (sometime due to some error)
+        try:
+            if self.driver.find_element_by_xpath(
+                "//div[contains(text(), 'Process Watcher - "
+                    "Restoring backup')]"):
+                self.driver.find_element_by_xpath(
+                    "//div[div[div[div[contains(text(), 'Process Watcher "
+                    "- Restoring backup')]]]]"
+                    "/following-sibling::div/div/div").click()
+        except Exception:
+            pass
+
         self.page.remove_server(self.server)
         connection = test_utils.get_db_connection(
             self.server['db'],
diff --git a/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py b/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py
index f7933861..8a0cc9ca 100644
--- a/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py
+++ b/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py
@@ -7,9 +7,8 @@
 #
 ##########################################################################
 import time
+
 from selenium.webdriver.support.ui import WebDriverWait
-from selenium.webdriver.common.by import By
-from selenium.webdriver.support import expected_conditions as EC
 from regression.feature_utils.base_feature_test import BaseFeatureTest
 from regression.python_test_utils import test_utils
 
@@ -37,6 +36,7 @@ class PGUtilitiesMaintenanceFeatureTest(BaseFeatureTest):
                     self.server['name']
                 )
             )
+
         connection = test_utils.get_db_connection(
             self.server['db'],
             self.server['username'],
@@ -97,6 +97,28 @@ class PGUtilitiesMaintenanceFeatureTest(BaseFeatureTest):
             "div.wcFloatingFocus div.fa-close").click()
 
     def after(self):
+        # In cases where backup div is not closed
+        try:
+            if self.driver.find_element_by_css_selector(
+            ".ajs-message.ajs-bg-bgprocess.ajs-visible >div >div  >div>i"):
+                self.driver.find_element_by_css_selector(
+                    ".ajs-message.ajs-bg-bgprocess.ajs-visible >div >div  "
+                    ">div>i").click()
+        except Exception:
+            pass
+
+        # In cases where restore div is not closed (sometime due to some error)
+        try:
+            if self.driver.find_element_by_xpath(
+                "//div[contains(text(), 'Process Watcher - "
+                    "Restoring backup')]"):
+                self.driver.find_element_by_xpath(
+                    "//div[div[div[div[contains(text(), 'Process Watcher "
+                    "- Restoring backup')]]]]"
+                    "/following-sibling::div/div/div").click()
+        except Exception:
+            pass
+
         self.page.remove_server(self.server)
         connection = test_utils.get_db_connection(
             self.server['db'],
