diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/ui_logger_dsl/Special_commands.tx | 19 | ||||
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 14 |
2 files changed, 30 insertions, 3 deletions
diff --git a/uitest/ui_logger_dsl/Special_commands.tx b/uitest/ui_logger_dsl/Special_commands.tx index fc1940c7ef91..5fbd9972a275 100644 --- a/uitest/ui_logger_dsl/Special_commands.tx +++ b/uitest/ui_logger_dsl/Special_commands.tx @@ -6,7 +6,7 @@ import type_options */ SpecialCommand: - writer_command | calc_command | impress_command | math_command + writer_command | calc_command | impress_command | math_command | draw_command ; /* @@ -144,7 +144,7 @@ impress_Type_command: This part for all the math log statments: 1) element selector - 2) Type + 2) Type then we can add whatever we need in the future */ @@ -156,4 +156,19 @@ math_element_selector: ; math_Type_command: 'Type on math ' what_to_type=Type_options +; + +//=================================================================// +/* + This part for all the draw log statments: + + 1) Type + + then we can add whatever we need in the future +*/ +draw_command: + draw_Type_command +; +draw_Type_command: + 'Type on draw ' what_to_type=Type_options ;
\ No newline at end of file diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py index ab198a6d234f..8d5a8a82ac0b 100644 --- a/uitest/ui_logger_dsl/dsl_core.py +++ b/uitest/ui_logger_dsl/dsl_core.py @@ -87,6 +87,7 @@ class ul_Compiler: 'math_element_selector':self.handle_math_element_selector, 'math_Type_command':self.handle_math_Type_command, 'setZoom_command':self.handle_setZoom_command, + 'draw_Type_command':self.handle_draw_Type_command, 'writer_Copy_Text':self.do_nothing, 'writer_Cut_Text':self.do_nothing, @@ -165,7 +166,7 @@ class ul_Compiler: line="\t\tMainWindow = self.xUITest.getTopFocusWindow()\n" self.variables.append(line) app={"writer":"writer_edit","calc":"grid_window","impress":"impress_win"\ - ,"math":"math_edit"} + ,"math":"math_edit","draw":"draw_win"} self.current_app=app[StarterCommand.program_name] self.prev_command=StarterCommand @@ -391,6 +392,17 @@ class ul_Compiler: self.prev_command=math_Type_command + def handle_draw_Type_command (self,draw_Type_command): + + self.init_app() + if(draw_Type_command.what_to_type.__class__.__name__=="char"): + self.write_line_with_one_parameters(self.current_app,"TYPE","TEXT",draw_Type_command.what_to_type.input_char) + + elif(draw_Type_command.what_to_type.__class__.__name__=="KeyCode"): + self.write_line_with_one_parameters(self.current_app,"TYPE","KEYCODE",draw_Type_command.what_to_type.input_key_code) + + self.prev_command=draw_Type_command + def handle_math_element_selector (self,math_element_selector): line="\t\t"+str(math_element_selector.element_no)+" = element_selector.getChild(\""+\ |