From 01ff7460b83da265a0c68fa01cf2282f4e7dd72e Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 4 Jun 2021 15:27:56 +0200 Subject: Fix UITest It needs to wait until vnd.sun.star.findbar:FocusToFindbar does its magic, which was racing with Python executing its typing. This adds "SelectedText" property to ComboBoxUIObject::get_state. Change-Id: I30faab2cc36a3cde59cf72ae5a383738a3ad4738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116694 Reviewed-by: Xisco Fauli Reviewed-by: Mike Kaganski Tested-by: Jenkins --- sw/qa/uitest/findBar/tdf136941.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sw') diff --git a/sw/qa/uitest/findBar/tdf136941.py b/sw/qa/uitest/findBar/tdf136941.py index ab94449aefed..c77a7e2a2277 100644 --- a/sw/qa/uitest/findBar/tdf136941.py +++ b/sw/qa/uitest/findBar/tdf136941.py @@ -40,6 +40,9 @@ class tdf136941(UITestCase): self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar") xfind = xWriterDoc.getChild("find") + self.ui_test.wait_until_property_is_updated(xfind, 'SelectedText', "Hello") + self.assertEqual("Hello", get_state_as_dict(xfind)['SelectedText']) + xfind.executeAction("TYPE", mkPropertyValues({"TEXT": "World"})) # Without the fix in place, this test would have failed with -- cgit v1.2.3