diff options
-rw-r--r-- | sw/source/uibase/uitest/uiobject.cxx | 3 | ||||
-rw-r--r-- | uitest/writer_tests5/tdf114724.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index a0b8da9e9d97..6a55e42cf5ac 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -147,7 +147,10 @@ void SwNavigationPIUIObject::execute(const OUString& rAction, const StringMap& rParameters) { if (rAction == "ROOT") + { + mxSwNavigationPI->m_xContentTree->grab_focus(); mxSwNavigationPI->ToolBoxSelectHdl("root"); + } else WindowUIObject::execute(rAction, rParameters); } diff --git a/uitest/writer_tests5/tdf114724.py b/uitest/writer_tests5/tdf114724.py index 390e53b3ac37..46d19468d43c 100644 --- a/uitest/writer_tests5/tdf114724.py +++ b/uitest/writer_tests5/tdf114724.py @@ -25,6 +25,10 @@ class tdf114724(UITestCase): xNavigatorPanel = xWriterEdit.getChild("NavigatorPanelParent") xNavigatorPanel.executeAction("ROOT", tuple()) + xContentTree = xNavigatorPanel.getChild('contenttree') + #Check the content has changed + self.assertEqual(len(xContentTree.getChildren()), 1) + xWriterEdit.executeAction("FOCUS", tuple()) time.sleep(2) self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1") |