diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-19 20:52:43 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:02:24 +0200 |
commit | 559f2e233108ed5e9da305ffbf945d6ed568f7eb (patch) | |
tree | 8921d0ff92910ba2b84cf4f5d14dfe320f7c04e3 /uitest/calc_tests | |
parent | fc0c5d6163e99d29498c9b8599d9bdf9a3e4ca6c (diff) |
uitest: add demo showing how to activate chart
Change-Id: I40293ca1f786c08a51d01fde5e90b75af2e67f6b
Diffstat (limited to 'uitest/calc_tests')
-rw-r--r-- | uitest/calc_tests/create_chart.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/uitest/calc_tests/create_chart.py b/uitest/calc_tests/create_chart.py index 30f0aa7444fa..1e72df7a474a 100644 --- a/uitest/calc_tests/create_chart.py +++ b/uitest/calc_tests/create_chart.py @@ -150,4 +150,37 @@ def deselect_chart(xContext): ui_test.close_doc() +def activate_chart(xContext): + xUITest = xContext.ServiceManager.createInstanceWithContext( + "org.libreoffice.uitest.UITest", xContext) + + ui_test = UITest(xUITest, xContext) + + ui_test.create_doc_in_start_center("calc") + + fill_spreadsheet(xUITest) + + xCalcDoc = xUITest.getTopFocusWindow() + xGridWindow = xCalcDoc.getChild("grid_window") + + ui_test.execute_dialog_through_command(".uno:InsertObjectChart") + + xChartDlg = xUITest.getTopFocusWindow() + + xNextBtn = xChartDlg.getChild("finish") + xNextBtn.executeAction("CLICK", tuple()) + + xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) + + time.sleep(2) + + xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) + xGridWindow.executeAction("ACTIVATE", tuple()) + + time.sleep(2) + + xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) + + ui_test.close_doc() + # vim:set shiftwidth=4 softtabstop=4 expandtab: */ |