diff --git a/test/e2e/driver/squish_api.py b/test/e2e/driver/squish_api.py index 163e544382..7a0a7f35d6 100644 --- a/test/e2e/driver/squish_api.py +++ b/test/e2e/driver/squish_api.py @@ -1,12 +1,17 @@ import time import configs.timeouts +import driver def waitFor(condition, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> bool: started_at = time.monotonic() while not condition(): time.sleep(1) - if time.monotonic() - started_at > timeout_msec/1000: + if time.monotonic() - started_at > timeout_msec / 1000: return False return True + + +def isFrozen(timeout_msec): + return driver.currentApplicationContext().isFrozen(timeout_msec) diff --git a/test/e2e/gui/elements/object.py b/test/e2e/gui/elements/object.py index fd3c458215..682825fd17 100644 --- a/test/e2e/gui/elements/object.py +++ b/test/e2e/gui/elements/object.py @@ -6,7 +6,7 @@ import allure import configs import driver -from gui.objects_map import names +from driver import isFrozen from scripts.tools.image import Image LOG = logging.getLogger(__name__) @@ -92,8 +92,12 @@ class QObject: self, x: int = None, y: int = None, - button=None + button=None, ): + if isFrozen(500) is False: + pass + else: + time.sleep(2000) driver.mouseClick( self.object, x or int(self.object.width * 0.1),