diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-20 20:58:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:02:30 +0200 |
commit | 18bfce49b17d648914df7f51dca9c5b115053b11 (patch) | |
tree | 115324a080aaaaf76578a9954e061d2987a7221a /uitest/writer_tests | |
parent | d9f8f73926ebbf030233731ed7f6bde06eb80d09 (diff) |
uitest: add demo showing how to type text into writer
Change-Id: I32598d12c85ad36d5c5d9ab00c184bfb7e39a4bd
Diffstat (limited to 'uitest/writer_tests')
-rw-r--r-- | uitest/writer_tests/start.py | 17 |
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: */ |