summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-26 12:43:23 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-17 21:10:38 +0200
commita4c8c2a5e8a035ee6234816d7f1f1db27d500c58 (patch)
tree5461899c41024f18e49ce5476b24d7261e8baf18
parent3189557e51acb782308fe716ba19137047e9f51c (diff)
uitest: add more impress tests
Change-Id: I89bd0af49e530382f0201a108f8798f9a9d689e3
-rw-r--r--uitest/impress_tests/start.py80
1 files changed, 80 insertions, 0 deletions
diff --git a/uitest/impress_tests/start.py b/uitest/impress_tests/start.py
index 0c5ef2a10c09..c817cfedb87f 100644
--- a/uitest/impress_tests/start.py
+++ b/uitest/impress_tests/start.py
@@ -29,6 +29,86 @@ def start_impress(xContext):
ui_test.create_doc_in_start_center("impress")
+ xImpressDoc = xUITest.getTopFocusWindow()
+ print(get_state_as_dict(xImpressDoc))
+ print(xImpressDoc.getChildren())
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+ xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+ print(xEditWin.getChildren())
+
+ time.sleep(5)
+
+ ui_test.close_doc()
+
+def select_page(xContext):
+ xUITest = xContext.ServiceManager.createInstanceWithContext(
+ "org.libreoffice.uitest.UITest", xContext)
+
+ ui_test = UITest(xUITest, xContext)
+
+ ui_test.create_doc_in_start_center("impress")
+
+ xImpressDoc = xUITest.getTopFocusWindow()
+ print(get_state_as_dict(xImpressDoc))
+ print(xImpressDoc.getChildren())
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+
+ time.sleep(10)
+ print(get_state_as_dict(xEditWin))
+
+ xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+
+ time.sleep(5)
+
+ print(get_state_as_dict(xEditWin))
+
+ ui_test.close_doc()
+
+def select_text(xContext):
+ xUITest = xContext.ServiceManager.createInstanceWithContext(
+ "org.libreoffice.uitest.UITest", xContext)
+
+ ui_test = UITest(xUITest, xContext)
+
+ ui_test.create_doc_in_start_center("impress")
+
+ xImpressDoc = xUITest.getTopFocusWindow()
+ print(get_state_as_dict(xImpressDoc))
+ print(xImpressDoc.getChildren())
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+
+ time.sleep(10)
+
+ print(get_state_as_dict(xEditWin))
+
+ ui_test.close_doc()
+
+def select_object(xContext):
+ xUITest = xContext.ServiceManager.createInstanceWithContext(
+ "org.libreoffice.uitest.UITest", xContext)
+
+ ui_test = UITest(xUITest, xContext)
+
+ ui_test.create_doc_in_start_center("impress")
+
+ xImpressDoc = xUITest.getTopFocusWindow()
+ print(get_state_as_dict(xImpressDoc))
+ print(xImpressDoc.getChildren())
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+ time.sleep(2)
+ xEditWin.executeAction("DESELECT", tuple())
+
+ time.sleep(4)
+
+ print(get_state_as_dict(xEditWin))
+
ui_test.close_doc()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */