summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-20 20:50:43 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-17 21:10:23 +0200
commit7a366899de710eda04dab32101c033f2b7893558 (patch)
tree18480a2d8e7be3874f8e03230fe9d868585cadf8
parentb38d718c17f6d5b7725e253db08b673e211164d7 (diff)
uitest: add initial writer demos
Change-Id: If0aaf07b061fde3d5efa0d604af002efc872f726
-rw-r--r--uitest/writer_tests/start.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py
new file mode 100644
index 000000000000..65ca0edba578
--- /dev/null
+++ b/uitest/writer_tests/start.py
@@ -0,0 +1,44 @@
+# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest_helper import UITest
+
+from helper import mkPropertyValues
+
+import time
+
+try:
+ import pyuno
+ import uno
+ import unohelper
+except ImportError:
+ print("pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP variables")
+ print("PYTHONPATH=/installation/opt/program")
+ print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc")
+ raise
+
+def start_writer(xContext):
+ xUITest = xContext.ServiceManager.createInstanceWithContext(
+ "org.libreoffice.uitest.UITest", xContext)
+
+ ui_test = UITest(xUITest, xContext)
+
+ ui_test.create_doc_in_start_center("writer")
+
+ xWriterDoc = xUITest.getTopFocusWindow()
+ print(xWriterDoc.getChildren())
+
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ print(xWriterEdit.getState())
+
+ xWriterEdit.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+
+ time.sleep(2)
+
+ ui_test.close_doc()
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab: */