diff options
-rw-r--r-- | sw/qa/uitest/findBar/tdf138232.py | 3 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/uitest/findBar/tdf138232.py b/sw/qa/uitest/findBar/tdf138232.py index 93f859bc7521..62a79824ea4d 100644 --- a/sw/qa/uitest/findBar/tdf138232.py +++ b/sw/qa/uitest/findBar/tdf138232.py @@ -23,6 +23,9 @@ class tdf138232(UITestCase): self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar") xfind = xWriterDoc.getChild("find") + self.ui_test.wait_until_property_is_updated(xfind, 'HasFocus', "true") + self.assertEqual("true", get_state_as_dict(xfind)['HasFocus']) + xfind.executeAction("TYPE", mkPropertyValues({"TEXT": "Hello"})) self.assertEqual("Hello", get_state_as_dict(xfind)['Text']) diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 6c14c2192177..f04e8c54cc95 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -300,6 +300,7 @@ StringMap WindowUIObject::get_state() aMap["Visible"] = OUString::boolean(mxWindow->IsVisible()); aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible()); aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled()); + aMap["HasFocus"] = OUString::boolean(mxWindow->HasChildPathFocus()); aMap["WindowType"] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16); Point aPos = mxWindow->GetPosPixel(); |