summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorSaurav Chirania <saurav.chir@gmail.com>2018-07-02 08:46:06 +0530
committerSaurav Chirania <saurav.chir@gmail.com>2018-07-02 06:44:43 +0200
commitad511ce89c3ceddd3a8c6d650ce81df1e35bc48f (patch)
tree8499251014f8159e9bbc20403748cb18f9ebd36a /uitest
parent59d53910de13acfc2070e6240b936806af35c0a5 (diff)
uitest interpreter: add support for starting apps
Change-Id: Iaab98515d2046aaff1e3da4f80de192ebc01a9eb Reviewed-on: https://gerrit.libreoffice.org/56789 Tested-by: Jenkins Reviewed-by: Saurav Chirania <saurav.chir@gmail.com>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/loginterpreter.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/uitest/loginterpreter.py b/uitest/loginterpreter.py
index 9da08dd0acb9..ccc805056a7b 100644
--- a/uitest/loginterpreter.py
+++ b/uitest/loginterpreter.py
@@ -98,12 +98,27 @@ def get_coupling_type(line1, line2):
return "NOT_A_COUPLE"
+def check_app_starting_action(action_dict):
+ app_starter_button_ids = \
+ set(["draw_all", "impress_all", "calc_all" , "writer_all", "database_all", "math_all"])
+
+ if action_dict["keyword"] == "ButtonUIObject" and action_dict["Action"] == "CLICK" and \
+ action_dict["Id"] in app_starter_button_ids:
+ return True
+ return False
+
def get_test_line_from_one_log_line(log_line):
action_dict = parse_line(log_line)
test_line = " "
if action_dict["keyword"].endswith("UIObject"):
parent = action_dict["Parent"]
- if (parent != ""):
+ if (check_app_starting_action(action_dict)):
+ test_line +=\
+ "MainDoc = self.ui_test.create_doc_in_start_center(\"" + \
+ action_dict["Id"][:-4] +"\")\n MainWindow = " + \
+ "self.xUITest.getTopFocusWindow()\n"
+ return test_line
+ elif (parent != ""):
test_line += \
action_dict["Id"] + " = " + parent + ".getChild(\"" + \
action_dict["Id"] + "\")\n " + \