void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); // Click on NotAdministered button Report.Log(ReportLevel.Info, "Mouse", "Click on NotAdministered button\r\nMouse Left Click item 'FrmEditDrug.NotAdministered' at Center.", repo.FrmEditDrug.NotAdministeredInfo, new RecordItemIndex(0)); repo.FrmEditDrug.NotAdministered.Click(); Delay.Milliseconds(200); // Enter reason DRUGCodeCollection.ReaonForNotAdminisDrug(ReasonNotAdminis, NotAdminisComment); Delay.Milliseconds(0); // create comment from reason and notAdminis comment CreateNotAd_ReasonComment(ReasonNotAdminis, NotAdminisComment); Delay.Milliseconds(0); // Validate the add drug does not exist Report.Log(ReportLevel.Info, "Validation", "Validate the add drug does not exist\r\nValidating NotExists on item 'FrmORMain.Drugs.NotAdminisDrugItem'.", repo.FrmORMain.Drugs.NotAdminisDrugItemInfo, new RecordItemIndex(3)); Validate.NotExists(repo.FrmORMain.Drugs.NotAdminisDrugItemInfo); Delay.Milliseconds(0); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); // Click on a NotAdminnis drug Report.Log(ReportLevel.Info, "Mouse", "Click on a NotAdminnis drug\r\nMouse Left Click item 'FrmORMain.Drugs.NotAdminisDrugItem' at Center.", repo.FrmORMain.Drugs.NotAdminisDrugItemInfo, new RecordItemIndex(0)); repo.FrmORMain.Drugs.NotAdminisDrugItem.Click(); Delay.Milliseconds(200); // Click on NotAdminis button Report.Log(ReportLevel.Info, "Mouse", "Click on NotAdminis button\r\nMouse Left Click item 'FrmORMain.Drugs.Drugs.NotAdministered' at Center.", repo.FrmORMain.Drugs.Drugs.NotAdministeredInfo, new RecordItemIndex(1)); repo.FrmORMain.Drugs.Drugs.NotAdministered.Click(); Delay.Milliseconds(200); // enter new reason and comment DRUGCodeCollection.ReaonForNotAdminisDrug(DifferReasonNotAdminis, DifferNotAdminisComment); Delay.Milliseconds(0); DRUGCodeCollection.ValidateNotAdminisDrugItem(DifferReasonNotAdminis, DifferNotAdminisComment); Delay.Milliseconds(0); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); // Click on Drug item Report.Log(ReportLevel.Info, "Mouse", "Click on Drug item\r\nMouse Left Click item 'FrmORMain.Drugs.Drugs.DrugListItemDetail' at Center.", repo.FrmORMain.Drugs.Drugs.DrugListItemDetailInfo, new RecordItemIndex(0)); repo.FrmORMain.Drugs.Drugs.DrugListItemDetail.Click(); Delay.Milliseconds(200); // Click on "Not Administered" Report.Log(ReportLevel.Info, "Mouse", "Click on \"Not Administered\"\r\nMouse Left Click item 'FrmORMain.Drugs.Drugs.NotAdministered' at Center.", repo.FrmORMain.Drugs.Drugs.NotAdministeredInfo, new RecordItemIndex(1)); repo.FrmORMain.Drugs.Drugs.NotAdministered.Click(); Delay.Milliseconds(200); // Select reason and comment DRUGCodeCollection.ReaonForNotAdminisDrug(ReasonNotAdminis, NotAdminisComment); Delay.Milliseconds(0); // check Drug item disappear on the list Report.Log(ReportLevel.Info, "Validation", "check Drug item disappear on the list\r\nValidating NotExists on item 'FrmORMain.Drugs.Drugs.DrugListItemDetail'.", repo.FrmORMain.Drugs.Drugs.DrugListItemDetailInfo, new RecordItemIndex(3)); Validate.NotExists(repo.FrmORMain.Drugs.Drugs.DrugListItemDetailInfo); 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.Drugs.Drugs.DrugListItem' at Center.", repo.FrmORMain.Drugs.Drugs.DrugListItemInfo, new RecordItemIndex(0)); repo.FrmORMain.Drugs.Drugs.DrugListItem.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmORMain.Drugs.Drugs.RepeatDrug' at Center.", repo.FrmORMain.Drugs.Drugs.RepeatDrugInfo, new RecordItemIndex(1)); repo.FrmORMain.Drugs.Drugs.RepeatDrug.Click(); Delay.Milliseconds(200); // Save the time when add drug Report.Log(ReportLevel.Info, "Get Value", "Save the time when add drug\r\nGetting attribute 'Text' from item 'FrmEditDrug.DrugTime' and assigning its value to variable 'TimeAddDrug'.", repo.FrmEditDrug.DrugTimeInfo, new RecordItemIndex(2)); TimeAddDrug = repo.FrmEditDrug.DrugTime.Element.GetAttributeValueText("Text"); Delay.Milliseconds(0); // Enter new Dose/Rate DRUGCodeCollection.EnterDosage(Mode, Dosage2); Delay.Milliseconds(0); // Enter Comment Report.Log(ReportLevel.Info, "Mouse", "Enter Comment\r\nMouse Left Click item 'FrmEditDrug.Comment' at Center.", repo.FrmEditDrug.CommentInfo, new RecordItemIndex(4)); repo.FrmEditDrug.Comment.Click(); Delay.Milliseconds(200); // Clear old value UserCodeCollection_OR.Clear_TextBox(repo.FrmEditDrug.CommentInfo, "Text"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$RepeatComment'.", new RecordItemIndex(6)); Keyboard.Press(RepeatComment); Delay.Milliseconds(100); // Click OK Report.Log(ReportLevel.Info, "Mouse", "Click OK\r\nMouse Left Click item 'FrmEditDrug.OK' at Center.", repo.FrmEditDrug.OKInfo, new RecordItemIndex(7)); repo.FrmEditDrug.OK.Click(); Delay.Milliseconds(200); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); // Select Mode DRUGCodeCollection.SelectMode(Mode); Delay.Milliseconds(0); // Enter Dose/Rate DRUGCodeCollection.EnterDosage(Mode, Dosage); Delay.Milliseconds(0); // Enter Unit DRUGCodeCollection.EnterUnit(Mode, Unit); 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.Drugs.Drugs.DrugListItem' at Center.", repo.FrmORMain.Drugs.Drugs.DrugListItemInfo, new RecordItemIndex(0)); repo.FrmORMain.Drugs.Drugs.DrugListItem.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmORMain.Drugs.Drugs.EditDrug' at Center.", repo.FrmORMain.Drugs.Drugs.EditDrugInfo, new RecordItemIndex(1)); repo.FrmORMain.Drugs.Drugs.EditDrug.Click(); Delay.Milliseconds(200); Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'Text' from item 'FrmEditDrug.DrugTime' and assigning its value to variable 'TimeAddDrug'.", repo.FrmEditDrug.DrugTimeInfo, new RecordItemIndex(2)); TimeAddDrug = repo.FrmEditDrug.DrugTime.Element.GetAttributeValueText("Text"); Delay.Milliseconds(0); // Select Mode DRUGCodeCollection.SelectMode(NewMode); Delay.Milliseconds(0); // Enter new Dose/Rate DRUGCodeCollection.EnterDosage(NewMode, NewDosage); Delay.Milliseconds(0); // Enter new Unit DRUGCodeCollection.EnterUnit(NewMode, NewUnit); Delay.Milliseconds(0); // Reassign DoseUnit ReAssignDoseUnit(NewDoseUnit); Delay.Milliseconds(0); // Click Ok Report.Log(ReportLevel.Info, "Mouse", "Click Ok\r\nMouse Left Click item 'FrmEditDrug.OK' at Center.", repo.FrmEditDrug.OKInfo, new RecordItemIndex(7)); repo.FrmEditDrug.OK.Click(); Delay.Milliseconds(200); }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmORMain.OR_Modules.Drugs' at Center.", repo.FrmORMain.OR_Modules.DrugsInfo, new RecordItemIndex(0)); repo.FrmORMain.OR_Modules.Drugs.Click(); Delay.Milliseconds(200); // Click on Drug tab Report.Log(ReportLevel.Info, "Mouse", "Click on Drug tab\r\nMouse Left Click item 'FrmORMain.Drugs.Tabs.DrugsTab' at Center.", repo.FrmORMain.Drugs.Tabs.DrugsTabInfo, new RecordItemIndex(1)); repo.FrmORMain.Drugs.Tabs.DrugsTab.Click(); Delay.Milliseconds(200); // Press F4 to add drug Report.Log(ReportLevel.Info, "Keyboard", "Press F4 to add drug\r\nKey 'F4' Press.", new RecordItemIndex(2)); Keyboard.Press(System.Windows.Forms.Keys.F4, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Save the time when add drug Report.Log(ReportLevel.Info, "Get Value", "Save the time when add drug\r\nGetting attribute 'Text' from item 'FrmEditDrug.DrugTime' and assigning its value to variable 'TimeAddDrug'.", repo.FrmEditDrug.DrugTimeInfo, new RecordItemIndex(3)); TimeAddDrug = repo.FrmEditDrug.DrugTime.Element.GetAttributeValueText("Text"); Delay.Milliseconds(0); // Press tab from Drug Product Report.Log(ReportLevel.Info, "Keyboard", "Press tab from Drug Product\r\nKey 'Tab' Press.", new RecordItemIndex(4)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Open Add new drug window Report.Log(ReportLevel.Info, "Keyboard", "Open Add new drug window\r\nKey 'Enter' Press.", new RecordItemIndex(5)); Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Enter a new Drug name Report.Log(ReportLevel.Info, "Keyboard", "Enter a new Drug name\r\nKey sequence from variable '$DrugProduct'.", new RecordItemIndex(6)); Keyboard.Press(DrugProduct); Delay.Milliseconds(100); Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(7)); Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press tab to focus on button OK Report.Log(ReportLevel.Info, "Keyboard", "Press tab to focus on button OK\r\nKey 'Tab' Press.", new RecordItemIndex(8)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press enter to save Report.Log(ReportLevel.Info, "Keyboard", "Press enter to save\r\nKey 'Enter' Press.", new RecordItemIndex(9)); Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Validate new drug is displayed in Drug name Report.Log(ReportLevel.Info, "Validation", "Validate new drug is displayed in Drug name\r\nValidating AttributeEqual (Text=$DrugProduct) on item 'FrmEditDrug.DrugProduct'.", repo.FrmEditDrug.DrugProductInfo, new RecordItemIndex(10)); Validate.AttributeEqual(repo.FrmEditDrug.DrugProductInfo, "Text", DrugProduct); Delay.Milliseconds(0); // Select Mode DRUGCodeCollection.SelectMode(Mode); Delay.Milliseconds(0); // Enter Dose/Rate EnterDosageUsingTab(Mode, Dosage); Delay.Milliseconds(0); // EnterUnit EnterUnitUsingTab(Mode, Unit); Delay.Milliseconds(0); // EnterComment EnterCommentUsingTab(Comment); Delay.Milliseconds(0); // Enter Route EnterRouteUsingTab(Route); Delay.Milliseconds(0); // Press tab Report.Log(ReportLevel.Info, "Keyboard", "Press tab\r\nKey 'Tab' Press.", new RecordItemIndex(16)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press tab Report.Log(ReportLevel.Info, "Keyboard", "Press tab\r\nKey 'Tab' Press.", new RecordItemIndex(17)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press tab Report.Log(ReportLevel.Info, "Keyboard", "Press tab\r\nKey 'Tab' Press.", new RecordItemIndex(18)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press tab to Button OK Report.Log(ReportLevel.Info, "Keyboard", "Press tab to Button OK\r\nKey 'Tab' Press.", new RecordItemIndex(19)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); // Press tab to Button Cancel Report.Log(ReportLevel.Info, "Keyboard", "Press tab to Button Cancel\r\nKey 'Tab' Press.", new RecordItemIndex(20)); Keyboard.Press(System.Windows.Forms.Keys.Tab, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Left}{Return}'.", new RecordItemIndex(21)); Keyboard.Press("{Left}{Return}"); Delay.Milliseconds(0); // Enter to click on OK to Save Drug Report.Log(ReportLevel.Info, "Keyboard", "Enter to click on OK to Save Drug\r\nKey 'Enter' Press.", new RecordItemIndex(22)); Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true); Delay.Milliseconds(0); }