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/demo_ui | |
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/demo_ui')
-rw-r--r-- | uitest/demo_ui/edit.py | 5 | ||||
-rw-r--r-- | uitest/demo_ui/spinfield.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/uitest/demo_ui/edit.py b/uitest/demo_ui/edit.py index a40677c5d8ae..5eff4e0fad90 100644 --- a/uitest/demo_ui/edit.py +++ b/uitest/demo_ui/edit.py @@ -8,6 +8,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.framework import UITestCase +from uitest.uihelper.common import type_text class EditTest(UITestCase): @@ -20,9 +21,7 @@ class EditTest(UITestCase): xEdit = xAddNameDlg.getChild("edit") - props = {"TEXT": "simpleRangeName"} - actionProps = mkPropertyValues(props) - xEdit.executeAction("TYPE", actionProps) + type_text(xEdit, "simpleRangeName") xAddBtn = xAddNameDlg.getChild("cancel") xAddBtn.executeAction("CLICK", tuple()) diff --git a/uitest/demo_ui/spinfield.py b/uitest/demo_ui/spinfield.py index 49952dcb4cfa..c093cf5d4d7c 100644 --- a/uitest/demo_ui/spinfield.py +++ b/uitest/demo_ui/spinfield.py @@ -6,9 +6,9 @@ # from libreoffice.uno.propertyvalue import mkPropertyValues -from uitest.uihelper.common import get_state_as_dict from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, type_text class SpinFieldTest(UITestCase): @@ -68,7 +68,7 @@ class SpinFieldTest(UITestCase): xCellsDlg = self.xUITest.getTopFocusWindow() xDecimalPlaces = xCellsDlg.getChild("leadzerosed") - xDecimalPlaces.executeAction("TYPE", mkPropertyValues({"TEXT": "4"})) + type_text(xDecimalPlaces, "4") decimal_places_state = get_state_as_dict(xDecimalPlaces) assert(decimal_places_state["Text"] == "41") |