diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/writer_tests5/tdf114724.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/uitest/writer_tests5/tdf114724.py b/uitest/writer_tests5/tdf114724.py index 390e53b3ac37..f5947a21e321 100644 --- a/uitest/writer_tests5/tdf114724.py +++ b/uitest/writer_tests5/tdf114724.py @@ -26,16 +26,28 @@ class tdf114724(UITestCase): xNavigatorPanel.executeAction("ROOT", tuple()) xWriterEdit.executeAction("FOCUS", tuple()) - time.sleep(2) self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1") + self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "Headings") + for _ in range(0,3): xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) - time.sleep(2) self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1") + + timeout = time.time() + 2 + while get_state_as_dict(xNavigatorPanel)["selectedtext"] != "HEADING 4" and time.time() < timeout: + time.sleep(0.1) + + self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 4") + for _ in range(0,3): xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) - time.sleep(2) self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1") + timeout = time.time() + 2 + while get_state_as_dict(xNavigatorPanel)["selectedtext"] != "HEADING 1" and time.time() < timeout: + time.sleep(0.1) + + self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 1") + self.xUITest.executeCommand(".uno:Sidebar") self.ui_test.close_doc() |