Esempio n. 1
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);
        }
Esempio n. 2
0
        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);
        }