How to disable GDI capture feature during runtime
Posted: Tue Sep 12, 2017 3:26 am
I'm creating automation script for an application that contains many custom element like diagram, status text (this text can be obtained with GDI capture feature), but this feature also affect to another function as well.
Firstly, this is test case for basic element that Ranorex can recognize it, and it run without any problem
+ Testcase_Check_Common_Element
+ Module_1:
+ Click button A
+ Fill value to text B
+ Click button C
+ Validate text D
+ etc...
Now, I add another test case to validate the status text:
+ Testcase_Check_Status_Text
+ Module_2: (Module Settings / GDI Capture Settings / Process names: added process name of the application)
+ Obtain the text: repo.myapplication.rawtext_status.RawTextValue
+ Validate the text
The test case also run OK, but when I run 2 test cases together, at each step of Module_1 (click button A, fill value to text B, ...), all diargram in the application flashing many time before it operate the step. I think that the diagram was constructed with some native GDI drawing function, and at each step of the module, Ranorex send message to the application window to make it "redrawing" and then capturing the text. It mean that at each step, Ranorex will refresh the RawText element no matter these element was used in the step or not. Is it correct?
Finally, if the above statement is true, how can I limit the GDI Capture process within the module/testcase only, that is, when running into Module_1, it will not capturing rawtext anymore
System information:
- Windows 7
- Ranorex version: 6.2.1
Firstly, this is test case for basic element that Ranorex can recognize it, and it run without any problem
+ Testcase_Check_Common_Element
+ Module_1:
+ Click button A
+ Fill value to text B
+ Click button C
+ Validate text D
+ etc...
Now, I add another test case to validate the status text:
+ Testcase_Check_Status_Text
+ Module_2: (Module Settings / GDI Capture Settings / Process names: added process name of the application)
+ Obtain the text: repo.myapplication.rawtext_status.RawTextValue
+ Validate the text
The test case also run OK, but when I run 2 test cases together, at each step of Module_1 (click button A, fill value to text B, ...), all diargram in the application flashing many time before it operate the step. I think that the diagram was constructed with some native GDI drawing function, and at each step of the module, Ranorex send message to the application window to make it "redrawing" and then capturing the text. It mean that at each step, Ranorex will refresh the RawText element no matter these element was used in the step or not. Is it correct?
Finally, if the above statement is true, how can I limit the GDI Capture process within the module/testcase only, that is, when running into Module_1, it will not capturing rawtext anymore
System information:
- Windows 7
- Ranorex version: 6.2.1