summaryrefslogtreecommitdiff
path: root/uitest/demo_ui/edit.py
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-22 05:57:06 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-22 18:19:34 +0200
commit19e380cfd980233b71915f34a1ba83d24bd5303e (patch)
tree8f70893172995635f070830baab037eb6622deb4 /uitest/demo_ui/edit.py
parentd8b376adba93a48e77ec9e81c96744d1e4997d88 (diff)
uitest: move the demo ui tests to the new unittest approach
Change-Id: I70222d701191f28f9dffb3bfdfbb7510d64d0251
Diffstat (limited to 'uitest/demo_ui/edit.py')
-rw-r--r--uitest/demo_ui/edit.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/uitest/demo_ui/edit.py b/uitest/demo_ui/edit.py
index f418a3600e63..8ddbb1c5876c 100644
--- a/uitest/demo_ui/edit.py
+++ b/uitest/demo_ui/edit.py
@@ -9,6 +9,8 @@ from uitest_helper import UITest
from helper import mkPropertyValues
+from UITestCase import UITestCase
+
try:
import pyuno
import uno
@@ -19,26 +21,24 @@ except ImportError:
print("URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc")
raise
-def type_text(xContext):
- xUITest = xContext.ServiceManager.createInstanceWithContext(
- "org.libreoffice.uitest.UITest", xContext)
+class EditTest(UITestCase):
- ui_test = UITest(xUITest, xContext)
+ def test_type_text(self):
- ui_test.create_doc_in_start_center("calc")
+ self.ui_test.create_doc_in_start_center("calc")
- ui_test.execute_modeless_dialog_through_command(".uno:AddName")
- xAddNameDlg = xUITest.getTopFocusWindow()
+ self.ui_test.execute_modeless_dialog_through_command(".uno:AddName")
+ xAddNameDlg = self.xUITest.getTopFocusWindow()
- xEdit = xAddNameDlg.getChild("edit")
+ xEdit = xAddNameDlg.getChild("edit")
- props = {"TEXT": "simpleRangeName"}
- actionProps = mkPropertyValues(props)
- xEdit.executeAction("TYPE", actionProps)
+ props = {"TEXT": "simpleRangeName"}
+ actionProps = mkPropertyValues(props)
+ xEdit.executeAction("TYPE", actionProps)
- xAddBtn = xAddNameDlg.getChild("cancel")
- xAddBtn.executeAction("CLICK", tuple())
+ xAddBtn = xAddNameDlg.getChild("cancel")
+ xAddBtn.executeAction("CLICK", tuple())
- ui_test.close_doc()
+ self.ui_test.close_doc()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */