- Record simple script:
- 1) Start Calc
- 2) Validation: Select Calculator -> Image -> Contains -> Select some region
So, you have 2 steps in your Recording.rxrec. Now
- convert both steps to User Code
- Cut code from 2nd method (Validation) and paste into 1st method (Calc start) and delete 2nd (now empty) method from recording and from code...
- At this point Ranorex remove something from script's code or from resource library, so now i getting compile errors:
- The name 'ElementCalc_Screenshot1_Options' does not exist in the current context (CS0103) - C:\Users\capture1\Documents\RanorexStudio Projects\screenshot test\screenshot test\Recording1.UserCode.cs:35,89
- The name 'ElementCalc_Screenshot1' does not exist in the current context (CS0103) - C:\Users\capture1\Documents\RanorexStudio Projects\screenshot test\screenshot test\Recording1.UserCode.cs:35,64
P.S.: Also, i found, that if i do it other way (cut code from 1st method and paste it to 2nd method) - it works. So it means, that data getting lost at moment, when method with Screenshot parameters are removed from original function...