summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-23 16:11:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-23 23:16:11 +0200
commit39605d175bc0fe52c904d4b41a184d7e2691f2dc (patch)
tree4b9fdb3b63260256bf3a5f7b497f43f5421dfaba /sc/qa
parentd81775f5b12080676ebaf659c5a4c10d64a9074b (diff)
Introduce wait_for_top_focus_window to fix UITest_calc_tests9
...which I had seen hang at least once, and after a manual `kill -9` of the hung soffice.bin process (still yielding in UI loop from within executing a dialog), it failed with > ====================================================================== > ERROR: test_tdf57841 (tdf57841.Tdf57841) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sc/qa/uitest/calc_tests9/tdf57841.py", line 27, in test_tdf57841 > self.assertEqual('true', get_state_as_dict(xDialog.getChild("tab"))['Selected']) > uno.com.sun.star.uno.RuntimeException: Could not find child with id: tab vcl/source/uitest/uiobject.cxx:467 (The subtle difference in naming is that wait_for_top_focus_window waits indefinitely, while its sister wait_until_* functions (like wait_until_child_is_available) can time out. There is no good reason here to allow for timing out.) Change-Id: I3e4dc68871f42d64160d8e411fe9a661bbaec192 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117739 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/uitest/calc_tests9/tdf57841.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/qa/uitest/calc_tests9/tdf57841.py b/sc/qa/uitest/calc_tests9/tdf57841.py
index 0eb2d260b699..995fab2647de 100644
--- a/sc/qa/uitest/calc_tests9/tdf57841.py
+++ b/sc/qa/uitest/calc_tests9/tdf57841.py
@@ -23,7 +23,7 @@ class Tdf57841(UITestCase):
xOpenBtn = xOpenDialog.getChild("open")
xOpenBtn.executeAction("CLICK", tuple())
- xDialog = self.xUITest.getTopFocusWindow()
+ xDialog = self.ui_test.wait_for_top_focus_window('TextImportCsvDialog')
self.assertEqual('true', get_state_as_dict(xDialog.getChild("tab"))['Selected'])
self.assertEqual('true', get_state_as_dict(xDialog.getChild("comma"))['Selected'])
self.assertEqual('true', get_state_as_dict(xDialog.getChild("semicolon"))['Selected'])