From 57e785e1cf52e422ac60cb259a2f53b696d3c4cc Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 22 Dec 2016 03:38:34 +0100 Subject: uitest: add a helper method for typing text Change-Id: If450e3f0ff1e2a8f33db05e9512a13e5771115a8 Reviewed-on: https://gerrit.libreoffice.org/32406 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- uitest/math_tests/start.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'uitest/math_tests') 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"]) -- cgit