void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); Report.Log(ReportLevel.Info, "Delay", "Waiting for 30s.", new RecordItemIndex(0)); Delay.Duration(30000, false); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmMainMenu.RetrieveAnaesthetic' at Center.", repo.FrmMainMenu.RetrieveAnaestheticInfo, new RecordItemIndex(1)); repo.FrmMainMenu.RetrieveAnaesthetic.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RetrieveAnaesthetic.SearchAnaesthetics.SearchAnaesthetics' at Center.", repo.RetrieveAnaesthetic.SearchAnaesthetics.SearchAnaestheticsInfo, new RecordItemIndex(2)); repo.RetrieveAnaesthetic.SearchAnaesthetics.SearchAnaesthetics.Click(); Delay.Milliseconds(200); UserCodeCollection_OR.EnterDate_Today(repo.RetrieveAnaesthetic.SearchAnaesthetics.OperationDateInfo, DateFormat); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RetrieveAnaesthetic.SearchAnaesthetics.NHINumber' at Center.", repo.RetrieveAnaesthetic.SearchAnaesthetics.NHINumberInfo, new RecordItemIndex(4)); repo.RetrieveAnaesthetic.SearchAnaesthetics.NHINumber.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Keyboard", "Key 'Home' Press.", new RecordItemIndex(5)); Keyboard.Press(System.Windows.Forms.Keys.Home, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$NHI'.", new RecordItemIndex(6)); Keyboard.Press(NHI); Delay.Milliseconds(100); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RetrieveAnaesthetic.SearchAnaesthetics.Search' at Center.", repo.RetrieveAnaesthetic.SearchAnaesthetics.SearchInfo, new RecordItemIndex(7)); repo.RetrieveAnaesthetic.SearchAnaesthetics.Search.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RetrieveAnaesthetic.SearchListItem' at Center.", repo.RetrieveAnaesthetic.SearchListItemInfo, new RecordItemIndex(8)); repo.RetrieveAnaesthetic.SearchListItem.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'RetrieveAnaesthetic.ButtonRetrieve' at Center.", repo.RetrieveAnaesthetic.ButtonRetrieveInfo, new RecordItemIndex(9)); repo.RetrieveAnaesthetic.ButtonRetrieve.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'ConfirmPatientIdentity.ButtonYes' at Center.", repo.ConfirmPatientIdentity.ButtonYesInfo, new RecordItemIndex(10)); repo.ConfirmPatientIdentity.ButtonYes.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Information.ButtonOK' at Center.", repo.Information.ButtonOKInfo, new RecordItemIndex(11)); repo.Information.ButtonOK.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Validation", "Validating Exists on item 'FrmORMain.Patient_Details.Tabs.MedicalAlertsAndDrugAllergiesCITab'.", repo.FrmORMain.Patient_Details.Tabs.MedicalAlertsAndDrugAllergiesCITabInfo, new RecordItemIndex(12)); Validate.Exists(repo.FrmORMain.Patient_Details.Tabs.MedicalAlertsAndDrugAllergiesCITabInfo); Delay.Milliseconds(0); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmORMain.FluidBalance.Tabs.FluidOutput' at Center.", repo.FrmORMain.FluidBalance.Tabs.FluidOutputInfo, new RecordItemIndex(0)); repo.FrmORMain.FluidBalance.Tabs.FluidOutput.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left DoubleClick item 'FrmORMain.FluidBalance.AddedFluidOutput' at Center.", repo.FrmORMain.FluidBalance.AddedFluidOutputInfo, new RecordItemIndex(1)); repo.FrmORMain.FluidBalance.AddedFluidOutput.DoubleClick(); Delay.Milliseconds(200); UserCodeCollection_OR.Clear_TextBox(repo.AddFluidOutput.DateInfo, "Text"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$InValidDate'.", new RecordItemIndex(3)); Keyboard.Press(InValidDate); Delay.Milliseconds(100); // CLick OK on Edit window Report.Log(ReportLevel.Info, "Mouse", "CLick OK on Edit window\r\nMouse Left Click item 'AddFluidOutput.ButtonOK' at Center.", repo.AddFluidOutput.ButtonOKInfo, new RecordItemIndex(4)); repo.AddFluidOutput.ButtonOK.Click(); Delay.Milliseconds(200); // Validate error message when name is empty Report.Log(ReportLevel.Info, "Validation", "Validate error message when name is empty\r\nValidating Exists on item 'Error.InvalidDateError'.", repo.Error.InvalidDateErrorInfo, new RecordItemIndex(5)); Validate.Exists(repo.Error.InvalidDateErrorInfo); Delay.Milliseconds(0); // Click Ok on error message Report.Log(ReportLevel.Info, "Mouse", "Click Ok on error message\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(6)); repo.Error.ButtonOK.Click(); Delay.Milliseconds(200); UserCodeCollection_OR.Clear_TextBox(repo.AddFluidOutput.DateInfo, "Text"); Delay.Milliseconds(0); // Enter today UserCodeCollection_OR.EnterDate_Today(repo.AddFluidOutput.DateInfo, "dd/mm/yyyy"); Delay.Milliseconds(0); // CLick OK on Edit window Report.Log(ReportLevel.Info, "Mouse", "CLick OK on Edit window\r\nMouse Left Click item 'AddFluidOutput.ButtonOK' at Center.", repo.AddFluidOutput.ButtonOKInfo, new RecordItemIndex(9)); repo.AddFluidOutput.ButtonOK.Click(); Delay.Milliseconds(200); }