diff options
author | Ahmed ElShreif <aelshreif7@gmail.com> | 2019-07-29 00:29:24 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-08-19 22:56:38 +0800 |
commit | 3c5fe9ae9f15fccecdd91b32c225c3cbd854eff0 (patch) | |
tree | 3c9c5243150820ff9ee8a4078c774e4239206de6 /uitest/ui_logger_dsl/dsl_core.py | |
parent | 00323f94615ac987123be8f83990028147656457 (diff) |
uitest: start logging draw events
Change-Id: I1b77b106db181a8cadc1ff0b2a5de6ad19fe6762
Diffstat (limited to 'uitest/ui_logger_dsl/dsl_core.py')
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 14 |
1 files changed, 13 insertions, 1 deletions
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(\""+\ |