diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-22 03:38:34 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-24 17:10:56 +0000 |
commit | 57e785e1cf52e422ac60cb259a2f53b696d3c4cc (patch) | |
tree | ff5adff271b61d0eb8e2c20839cf1a5a146ba47c /uitest/writer_tests | |
parent | 2dc821572e23dd0ac553e49244179e1e19d0df37 (diff) |
uitest: add a helper method for typing text
Change-Id: If450e3f0ff1e2a8f33db05e9512a13e5771115a8
Reviewed-on: https://gerrit.libreoffice.org/32406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'uitest/writer_tests')
-rw-r--r-- | uitest/writer_tests/start.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py index 26b75ce0751e..c8cbcbba4884 100644 --- a/uitest/writer_tests/start.py +++ b/uitest/writer_tests/start.py @@ -5,11 +5,10 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -from uitest.uihelper.common import get_state_as_dict - from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, type_text import time @@ -34,7 +33,7 @@ class SimpleWriterTest(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "This is my first writer text written through the UI testing"})) + type_text(xWriterEdit, "This is my first writer text written through the UI testing") self.ui_test.close_doc() @@ -62,7 +61,7 @@ class SimpleWriterTest(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "This is my first writer text written through the UI testing"})) + type_text(xWriterEdit, "This is my first writer text written through the UI testing") xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "4"})) |