void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); if (File.Exists("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\Concentricity.STA")) { File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\Concentricity.STA"); } if (File.Exists("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\SizeAcross.STA")) { File.Delete("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\SizeAcross.STA"); } string strBigModeCaptionText = "Measure"; bool bBigMode = true; try { Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.MeasureText' at Center.", repo.SnapXUntitled.MeasureTextInfo, new RecordItemIndex(0)); repo.SnapXUntitled.MeasureText.MoveTo(); Delay.Milliseconds(200); bBigMode = repo.SnapXUntitled.MeasureText.TextValue.CompareTo(strBigModeCaptionText) == 0 && repo.SnapXUntitled.MeasureText.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 Center.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(0)); repo.SnapXUntitled.TitleBar.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(1)); Keyboard.Press("{LMenu}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(2)); Keyboard.Press("f"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'o'.", new RecordItemIndex(3)); Keyboard.Press("o"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Delay", "Waiting for 2s.", new RecordItemIndex(4)); Delay.Duration(2000, false); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Routine\\Concentricity_Basler1.mxy'.", new RecordItemIndex(5)); Keyboard.Press("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Routine\\Concentricity_Basler1.mxy"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Return}'.", new RecordItemIndex(6)); Keyboard.Press("{Return}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at Center.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(7)); repo.SnapXUntitled.TitleBar.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(8)); Keyboard.Press("{LMenu}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(9)); Keyboard.Press("f"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'r'.", new RecordItemIndex(10)); Keyboard.Press("r"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ButtonOK' at 50;10.", repo.SnapXUntitled.ButtonOKInfo, new RecordItemIndex(11)); repo.SnapXUntitled.ButtonOK.Click("50;10"); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.Finish' at 81;9.", repo.SnapXUntitled.FinishInfo, new RecordItemIndex(12)); repo.SnapXUntitled.Finish.Click("81;9"); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Delay", "Waiting for 10s.", new RecordItemIndex(13)); Delay.Duration(10000, false); string strConcentricityValues = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\concentricity.STA"; string strHardcodedValues = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\HardcodedConcentricity.STA"; UtilityRun.RunConcentricity(strConcentricityValues, strHardcodedValues); Delay.Duration(2000); }
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 Center.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(0)); repo.SnapXUntitled.TitleBar.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(1)); Keyboard.Press("{LMenu}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(2)); Keyboard.Press("f"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'o'.", new RecordItemIndex(3)); Keyboard.Press("o"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Delay", "Waiting for 2s.", new RecordItemIndex(4)); Delay.Duration(2000, false); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Routine\\SizeAcross_Basler1.mxy'.", new RecordItemIndex(5)); Keyboard.Press("C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Routine\\SizeAcross_Basler1.mxy"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Return}'.", new RecordItemIndex(6)); Keyboard.Press("{Return}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at Center.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(7)); repo.SnapXUntitled.TitleBar.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(8)); Keyboard.Press("{LMenu}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(9)); Keyboard.Press("f"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'r'.", new RecordItemIndex(10)); Keyboard.Press("r"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ButtonOK' at 50;10.", repo.SnapXUntitled.ButtonOKInfo, new RecordItemIndex(11)); repo.SnapXUntitled.ButtonOK.Click("50;10"); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.Finish' at 81;9.", repo.SnapXUntitled.FinishInfo, new RecordItemIndex(12)); repo.SnapXUntitled.Finish.Click("81;9"); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Delay", "Waiting for 10s.", new RecordItemIndex(13)); Delay.Duration(10000, false); string strSizeAcrossValues = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\SizeAcross.STA"; string strHardcodedValues = "C:\\JORO\\AUTOMATIONS\\GIT_Automations\\VERSION 3\\AutomationConcentricity\\Reports\\HardcodedSizeAcross.STA"; UtilityRun.RunSizeAcross(strSizeAcrossValues, strHardcodedValues); Delay.Duration(2000); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.TitleBar' at Center.", repo.SnapXUntitled.TitleBarInfo, new RecordItemIndex(7)); repo.SnapXUntitled.TitleBar.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{LMenu}'.", new RecordItemIndex(8)); Keyboard.Press("{LMenu}"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'f'.", new RecordItemIndex(9)); Keyboard.Press("f"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence 'n'.", new RecordItemIndex(10)); Keyboard.Press("n"); Delay.Milliseconds(300); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SnapXUntitled.ButtonGo' at 55;155.", repo.SnapXUntitled.ButtonGoInfo, new RecordItemIndex(0)); repo.SnapXUntitled.ButtonGo.Click("55;155"); Delay.Milliseconds(200); }