summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-20 20:58:47 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-17 21:10:25 +0200
commit2b6fa3323996020d67c1be35ae7abc58f737f35f (patch)
treee638dc9bb82d321b5b6d0e028a65b14771e10011
parentuitest: forward unhandled actions to the base class (diff)
downloadcore-2b6fa3323996020d67c1be35ae7abc58f737f35f.tar.gz
core-2b6fa3323996020d67c1be35ae7abc58f737f35f.zip
uitest: add demo showing how to type text into writer
Change-Id: I32598d12c85ad36d5c5d9ab00c184bfb7e39a4bd
-rw-r--r--uitest/writer_tests/start.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py
index 65ca0edba578..83b5ad2643c6 100644
--- a/uitest/writer_tests/start.py
+++ b/uitest/writer_tests/start.py
@@ -41,4 +41,21 @@ def start_writer(xContext):
ui_test.close_doc()
+def type_text(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()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "This is my first writer text written through the UI testing"}))
+
+ time.sleep(2)
+
+ ui_test.close_doc()
+
# vim:set shiftwidth=4 softtabstop=4 expandtab: */