summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-20 03:06:43 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-22 18:19:31 +0200
commite8b6bcc65f2870562da16d65f4ea2bfb70bd7886 (patch)
tree74c13711fc5d3d20ad56a528a38b384b442024be /uitest
parent9d2fa0bfdc93fa9bfed7dea89d603b1611d7a6e0 (diff)
uitest: add initial version for calc element demo
Change-Id: I09b724cb80d75b17fd3ad5f3736245f9fca1d17a
Diffstat (limited to 'uitest')
-rw-r--r--uitest/calc_tests/create_chart.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/uitest/calc_tests/create_chart.py b/uitest/calc_tests/create_chart.py
index 1e72df7a474a..6ec7082e7c77 100644
--- a/uitest/calc_tests/create_chart.py
+++ b/uitest/calc_tests/create_chart.py
@@ -183,4 +183,37 @@ def activate_chart(xContext):
ui_test.close_doc()
+def select_chart_element(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)
+ xCalcDoc = xUITest.getTopFocusWindow()
+ print(xCalcDoc.getChildren())
+ time.sleep(1)
+ ui_test.close_doc()
+
# vim:set shiftwidth=4 softtabstop=4 expandtab: */