diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/ui_logger_dsl/Special_commands.tx | 26 | ||||
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 20 |
2 files changed, 35 insertions, 11 deletions
diff --git a/uitest/ui_logger_dsl/Special_commands.tx b/uitest/ui_logger_dsl/Special_commands.tx index 071cfb9dcbbb..601a600f4bdb 100644 --- a/uitest/ui_logger_dsl/Special_commands.tx +++ b/uitest/ui_logger_dsl/Special_commands.tx @@ -60,22 +60,23 @@ writer_Insert_BreakPage: 1) select sheet 2) Select cell or range 3) launch AutoFill - 4) Delete Cells - 5) Remove Content of a cell - 6) Insert new Cells - 7) Cut Cells - 8) Copy Cells - 9) Paste Cells - 10) Merge Cells - 11) Unmerge Cells + 4) launch SELECTMENU + 5) Delete Cells + 6) Remove Content of a cell + 7) Insert new Cells + 8) Cut Cells + 9) Copy Cells + 10) Paste Cells + 11) Merge Cells + 12) Unmerge Cells then we can add whatever we need in the future */ calc_command: calc_Type_command | calc_switch_sheet | calc_Select_cell | calc_AutoFill_filter | - calc_Delete_Cells | calc_Remove_Content | calc_insert_cells | calc_Cut_Cells | - calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells | calc_Merge_Cells | - calc_Rename_Sheet | calc_Insert_sheet + calc_SelectMenu_filter | calc_Delete_Cells | calc_Remove_Content | calc_insert_cells | + calc_Cut_Cells | calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells | + calc_Merge_Cells | calc_Rename_Sheet | calc_Insert_sheet ; calc_Type_command: 'Type on current cell' what_to_type=Type_options @@ -89,6 +90,9 @@ calc_Select_cell: calc_AutoFill_filter: 'Launch AutoFilter from Col' col_num=INT 'and Row' row_num=INT ; +calc_SelectMenu_filter: + 'Launch SELECTMENU from Col' col_num=INT 'and Row' row_num=INT +; range_of_cells: '{' '"RANGE":' input_range=STRING '}' ; diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py index 644fc06e73dd..ebe936bba76a 100644 --- a/uitest/ui_logger_dsl/dsl_core.py +++ b/uitest/ui_logger_dsl/dsl_core.py @@ -110,6 +110,7 @@ class ul_Compiler: "calc_switch_sheet": self.handle_calc_switch_sheet, "calc_Type_command": self.handle_calc_Type_command, "calc_AutoFill_filter": self.handle_calc_AutoFill_filter, + "calc_SelectMenu_filter": self.handle_calc_SelectMenu_filter, "impress_Type_command": self.handle_impress_Type_command, "math_element_selector": self.handle_math_element_selector, "math_Type_command": self.handle_math_Type_command, @@ -726,6 +727,25 @@ class ul_Compiler: self.variables.append(line) self.prev_command = calc_AutoFill_filter + def handle_calc_SelectMenu_filter(self, calc_SelectMenu_filter): + + self.init_app() + + line = ( + double_tab + + self.current_app + + '.executeAction("LAUNCH", mkPropertyValues' + + '({"SELECTMENU": "", "COL": "' + + str(calc_SelectMenu_filter.col_num) + + '"' + + ', "ROW": "' + + str(calc_SelectMenu_filter.row_num) + + '"}))\n' + ) + + self.variables.append(line) + self.prev_command = calc_SelectMenu_filter + def handle_impress_Type_command(self, impress_Type_command): self.init_app() |