From 39605d175bc0fe52c904d4b41a184d7e2691f2dc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 23 Jun 2021 16:11:27 +0200 Subject: 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 --- sc/qa/uitest/calc_tests9/tdf57841.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/qa') 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']) -- cgit