summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-01 12:41:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 06:22:04 +0100
commit9071fa5f5f103808234102dc7552266ccda7bb22 (patch)
tree60436792e5200a7fdc6675691c6e390cc03fbc96
parentUpdate pointers to yet again moved ICU site / CLDR pages (diff)
downloadcore-9071fa5f5f103808234102dc7552266ccda7bb22.tar.gz
core-9071fa5f5f103808234102dc7552266ccda7bb22.zip
uitest: check that dialog really did open
to make it easier to debug cases where the event.executed flag is not sufficient to indicate that the dialog has finished opening Change-Id: Ibcbd089372e47908e3692d452f4064edbc7f788d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--uitest/uitest/test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 602b03c2a9f7..fcf9d3dee783 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -128,11 +128,14 @@ class UITest(object):
@contextmanager
def execute_dialog_through_command(self, command, printNames=False, close_button = "ok", eventName = "DialogExecute"):
with EventListener(self._xContext, eventName, printNames=printNames) as event:
+ xDialogParent = self._xUITest.getTopFocusWindow()
if not self._xUITest.executeDialog(command):
raise Exception("Dialog not executed for: " + command)
while True:
if event.executed:
xDialog = self._xUITest.getTopFocusWindow()
+ if xDialogParent == xDialog:
+ raise Exception("executing the action did not open the dialog")
try:
yield xDialog
except:
@@ -157,11 +160,14 @@ class UITest(object):
if parameters is None:
parameters = tuple()
+ xDialogParent = self._xUITest.getTopFocusWindow()
with EventListener(self._xContext, event_name) as event:
ui_object.executeAction(action, parameters)
while True:
if event.executed:
xDialog = self._xUITest.getTopFocusWindow()
+ if xDialogParent == xDialog:
+ raise Exception("executing the action did not open the dialog")
try:
yield xDialog
finally: