summaryrefslogtreecommitdiff
path: root/uitest/math_tests
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-22 03:38:34 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-24 17:10:56 +0000
commit57e785e1cf52e422ac60cb259a2f53b696d3c4cc (patch)
treeff5adff271b61d0eb8e2c20839cf1a5a146ba47c /uitest/math_tests
parent2dc821572e23dd0ac553e49244179e1e19d0df37 (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/math_tests')
-rw-r--r--uitest/math_tests/start.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py
index c8fbffd8dbb4..2842c1f1ef71 100644
--- a/uitest/math_tests/start.py
+++ b/uitest/math_tests/start.py
@@ -10,7 +10,7 @@ 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 type_text
from uitest.debug import sleep
import unittest
@@ -47,7 +47,7 @@ class SimpleMathTest(UITestCase):
xMathEdit = xMathDoc.getChild("math_edit")
- xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "E=mc^2"}))
+ type_text(xMathEdit, "E=mc^2")
self.ui_test.close_doc()
@@ -80,9 +80,9 @@ class SimpleMathTest(UITestCase):
xElement.executeAction("SELECT", tuple())
xMathEdit = xMathDoc.getChild("math_edit")
- xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"1"}))
+ type_text(xMathEdit, "1")
xMathEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"}))
- xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"2"}))
+ type_text(xMathEdit, "2")
edit_state = get_state_as_dict(xMathEdit)
self.assertEqual("1 <> 2 ", edit_state["Text"])