summaryrefslogtreecommitdiff
path: root/uitest/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-01-07 20:07:42 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-01-08 00:58:06 +0100
commitdbf83d315acc454b576355f2e5bd8412586827ac (patch)
tree99172b84e92dc4b9111f8f67ccf573870e293173 /uitest/uitest
parent38df2698123d52461679b4bedadd693b23cb4794 (diff)
uitest: add a shared helper method for selecting text
Change-Id: I15d059ea51ec1e7f0923dab5326a9bb8433e664c Reviewed-on: https://gerrit.libreoffice.org/47550 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'uitest/uitest')
-rw-r--r--uitest/uitest/uihelper/common.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/uitest/uitest/uihelper/common.py b/uitest/uitest/uihelper/common.py
index a83230b5a723..5056ef764983 100644
--- a/uitest/uitest/uihelper/common.py
+++ b/uitest/uitest/uihelper/common.py
@@ -16,4 +16,7 @@ def type_text(ui_object, text):
def select_pos(ui_object, pos):
ui_object.executeAction("SELECT", mkPropertyValues({"POS": pos}))
+def select_text(ui_object, from_pos, to):
+ ui_object.executeAction("SELECT", mkPropertyValues({"FROM": from_pos, "TO": to}))
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: