void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at 663;11.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(0)); repo.SnapXUntitled.TitleBar.Click("663;11"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(1)); Keyboard.Press("{LMenu}"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(2)); Keyboard.Press("f"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'o'.", new RecordItemIndex(3)); Keyboard.Press("o"); Thread.Sleep(3000); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Routines\\SpeedThree.mxy'.", new RecordItemIndex(6)); Keyboard.Press("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Routines\\SpeedThree.mxy"); Thread.Sleep(100); Keyboard.Press("{Return}"); Thread.Sleep(300); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at 668;9.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(8)); repo.SnapXUntitled.TitleBar.Click("668;9"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(9)); Keyboard.Press("{LMenu}"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(10)); Keyboard.Press("f"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'r'.", new RecordItemIndex(11)); Keyboard.Press("r"); Thread.Sleep(2000); Keyboard.Press("{Return}"); Thread.Sleep(100); //Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ButtonOK' at Center.", repo.SnapXUntitled.ButtonOKInfo, new RecordItemIndex(12)); //repo.SnapXUntitled.ButtonOK.Click(); //Thread.Sleep(200); do { Thread.Sleep(100); }while (!repo.SnapXUntitled.ReMeasure.Enabled); string ActualResultRoutineThree = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeThree.PRT"; int HardcodedResultRoutineThree = 75; UtilityRun.RunEx(ActualResultRoutineThree, HardcodedResultRoutineThree); Thread.Sleep(100); Thread.Sleep(3000); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ReMeasure' at Center.", repo.SnapXUntitled.ReMeasureInfo, new RecordItemIndex(19)); repo.SnapXUntitled.ReMeasure.Click(); Thread.Sleep(200); do { Thread.Sleep(100); }while (!repo.SnapXUntitled.ReMeasure.Enabled); ActualResultRoutineThree = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeThree.PRT"; HardcodedResultRoutineThree = 75; UtilityRun.RunEx(ActualResultRoutineThree, HardcodedResultRoutineThree); Thread.Sleep(100); Thread.Sleep(3000); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.Finish' at Center.", repo.SnapXUntitled.FinishInfo, new RecordItemIndex(26)); repo.SnapXUntitled.Finish.Click(); Thread.Sleep(7000); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); /////say hello//////// File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeOne.PRT"); File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeTwo.PRT"); File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeThree.PRT"); File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeFour.PRT"); File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeFive.PRT"); string strBigModeText = "Measure"; bool bBigMode = true; try { Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TextMeasure' at Center.", repo.SnapXUntitled.TextMeasureInfo, new RecordItemIndex(0)); repo.SnapXUntitled.TextMeasure.MoveTo(); Delay.Milliseconds(200); bBigMode = repo.SnapXUntitled.TextMeasure.TextValue.CompareTo(strBigModeText) == 0 && repo.SnapXUntitled.TextMeasure.Visible; } catch (Exception ex) { } if (!bBigMode) { repo.SnapXUntitled.SwitchToSensor.Click(); } Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at 663;11.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(0)); repo.SnapXUntitled.TitleBar.Click("663;11"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(1)); Keyboard.Press("{LMenu}"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(2)); Keyboard.Press("f"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'o'.", new RecordItemIndex(3)); Keyboard.Press("o"); Thread.Sleep(3000); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Routines\\SpeedOne.mxy'.", new RecordItemIndex(6)); Keyboard.Press("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Routines\\SpeedOne.mxy"); Thread.Sleep(200); Keyboard.Press("{Return}"); Thread.Sleep(300); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at 668;9.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(8)); repo.SnapXUntitled.TitleBar.Click("668;9"); Thread.Sleep(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(9)); Keyboard.Press("{LMenu}"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(10)); Keyboard.Press("f"); Thread.Sleep(100); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'r'.", new RecordItemIndex(11)); Keyboard.Press("r"); Thread.Sleep(2000); Keyboard.Press("{Return}"); Thread.Sleep(100); //USE THIS CODE IN CASE IN WHICH THE ENTER BUTTON DON'T EXECUTE THE MEASUREMENT// //Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ButtonOK' at Center.", repo.SnapXUntitled.ButtonOKInfo, new RecordItemIndex(12)); //repo.SnapXUntitled.ButtonOK.Click(); //Thread.Sleep(200); do { Thread.Sleep(100); }while (!repo.SnapXUntitled.ReMeasure.Enabled); string ActualResultRoutineOne = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeOne.PRT"; int HardcodedResultRoutineOne = 16; UtilityRun.RunEx(ActualResultRoutineOne, HardcodedResultRoutineOne); Delay.Milliseconds(200); Thread.Sleep(3000); { Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ReMeasure' at Center.", repo.SnapXUntitled.ReMeasureInfo, new RecordItemIndex(19)); repo.SnapXUntitled.ReMeasure.Click(); Thread.Sleep(200); } do { Thread.Sleep(100); }while (!repo.SnapXUntitled.Finish.Enabled); ActualResultRoutineOne = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationSpeedTest\\Reports\\ElapsedTimeOne.PRT"; HardcodedResultRoutineOne = 16; UtilityRun.RunEx(ActualResultRoutineOne, HardcodedResultRoutineOne); Thread.Sleep(100); Thread.Sleep(3000); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.Finish' at Center.", repo.SnapXUntitled.FinishInfo, new RecordItemIndex(26)); repo.SnapXUntitled.Finish.Click(); Thread.Sleep(7000); }