コード例 #1
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            // Click on Allergy item
            Report.Log(ReportLevel.Info, "Mouse", "Click on Allergy item\r\nMouse Left Click item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItem' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItemInfo, new RecordItemIndex(0));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItem.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.UndeleteMedicalAlert' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.UndeleteMedicalAlertInfo, new RecordItemIndex(1));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.UndeleteMedicalAlert.Click();
            Delay.Milliseconds(200);

            // Check validate duplicate ame message
            MedicalAlertAllergyCollection.CheckDupplicateDrugLCassConditionName("Condition");
            Delay.Milliseconds(0);

            // Click on OK button on Errror poppup
            Report.Log(ReportLevel.Info, "Mouse", "Click on OK button on Errror poppup\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(3));
            repo.Error.ButtonOK.Click();
            Delay.Milliseconds(200);
        }
コード例 #2
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            // Press Yes on Allergy area
            Report.Log(ReportLevel.Info, "Mouse", "Press Yes on Allergy area\r\nMouse Left Click item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonYes' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonYesInfo, new RecordItemIndex(0));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonYes.Click();
            Delay.Milliseconds(200);

            // Check status of yes button
            MedicalAlertAllergyCollection.CheckButtonIsPress(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonYesInfo, "Pressed");
            Delay.Milliseconds(0);

            // Press Yes on Medical area
            Report.Log(ReportLevel.Info, "Mouse", "Press Yes on Medical area\r\nMouse Left Click item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlert.ButtonYes' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlert.ButtonYesInfo, new RecordItemIndex(2));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlert.ButtonYes.Click();
            Delay.Milliseconds(200);

            // Check status of yes button
            MedicalAlertAllergyCollection.CheckButtonIsPress(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlert.ButtonYesInfo, "Pressed");
            Delay.Milliseconds(0);
        }
コード例 #3
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            // call check duplicate fucntiion
            MedicalAlertAllergyCollection.CheckDupplicateDrugLCassConditionName(typeDuplicate);
            Delay.Milliseconds(200);
            // Click OK on Error message poppup
            Report.Log(ReportLevel.Info, "Mouse", "Click OK on Error poppup\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(6));
            repo.Error.ButtonOK.Click();
            Delay.Milliseconds(200);
        }
コード例 #4
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left DoubleClick item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItem' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItemInfo, new RecordItemIndex(0));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItem.DoubleClick();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'EditMedicalAlert.Category' at Center.", repo.EditMedicalAlert.CategoryInfo, new RecordItemIndex(1));
            repo.EditMedicalAlert.Category.Click();
            Delay.Milliseconds(200);

            UserCodeCollection_OR.Clear_TextBox(repo.EditMedicalAlert.CategoryInfo, "Combobox");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$NameToEdit'.", new RecordItemIndex(3));
            Keyboard.Press(NameToEdit);
            Delay.Milliseconds(100);

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(4));
            Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'EditMedicalAlert.ButtonOK' at Center.", repo.EditMedicalAlert.ButtonOKInfo, new RecordItemIndex(5));
            repo.EditMedicalAlert.ButtonOK.Click();
            Delay.Milliseconds(200);

            // Check validate duplicate ame message
            MedicalAlertAllergyCollection.CheckDupplicateDrugLCassConditionName("Condition");
            Delay.Milliseconds(0);

            // Click on OK button on Errror poppup
            Report.Log(ReportLevel.Info, "Mouse", "Click on OK button on Errror poppup\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(7));
            repo.Error.ButtonOK.Click();
            Delay.Milliseconds(200);

            // Click on Cancel on edit medical window
            Report.Log(ReportLevel.Info, "Mouse", "Click on Cancel on edit medical window\r\nMouse Left Click item 'EditMedicalAlert.ButtonCancel' at Center.", repo.EditMedicalAlert.ButtonCancelInfo, new RecordItemIndex(8));
            repo.EditMedicalAlert.ButtonCancel.Click();
            Delay.Milliseconds(200);
        }
コード例 #5
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            // Check status of yes button
            MedicalAlertAllergyCollection.CheckButtonIsPress(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonYesInfo, YesButton);
            Delay.Milliseconds(0);

            // Check status of No button
            MedicalAlertAllergyCollection.CheckButtonIsPress(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.ButtonNoInfo, NoButton);
            Delay.Milliseconds(0);

            // Check status of Ask Me Larer button
            MedicalAlertAllergyCollection.CheckButtonIsPress(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.Allergy.AskMeLaterInfo, AskMeLater);
            Delay.Milliseconds(0);
        }
コード例 #6
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.Patient_Details.Medical_Alerts_and_Allergies.AddMedicalAlert' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AddMedicalAlertInfo, new RecordItemIndex(0));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AddMedicalAlert.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$Category' with focus on 'FrmAddMedicalAlert.Category'.", repo.FrmAddMedicalAlert.CategoryInfo, new RecordItemIndex(1));
            repo.FrmAddMedicalAlert.Category.PressKeys(Category);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(2));
            Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'Text' from item 'FrmAddMedicalAlert.Category' and assigning its value to variable 'NameToEdit'.", repo.FrmAddMedicalAlert.CategoryInfo, new RecordItemIndex(3));
            NameToEdit = repo.FrmAddMedicalAlert.Category.Element.GetAttributeValueText("Text");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddMedicalAlert.OK' at Center.", repo.FrmAddMedicalAlert.OKInfo, new RecordItemIndex(4));
            repo.FrmAddMedicalAlert.OK.Click();
            Delay.Milliseconds(200);

            // Check validate duplicate ame message
            MedicalAlertAllergyCollection.CheckDupplicateDrugLCassConditionName("Condition");
            Delay.Milliseconds(0);

            // Click on OK button on Errror poppup
            Report.Log(ReportLevel.Info, "Mouse", "Click on OK button on Errror poppup\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(6));
            repo.Error.ButtonOK.Click();
            Delay.Milliseconds(200);

            // Enter new Medical
            Report.Log(ReportLevel.Info, "Mouse", "Enter new Medical\r\nMouse Left Click item 'FrmAddMedicalAlert.Category' at Center.", repo.FrmAddMedicalAlert.CategoryInfo, new RecordItemIndex(7));
            repo.FrmAddMedicalAlert.Category.Click();
            Delay.Milliseconds(200);

            UserCodeCollection_OR.Clear_TextBox(repo.FrmAddMedicalAlert.CategoryInfo, "Text");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$NewMedicalName'.", new RecordItemIndex(9));
            Keyboard.Press(NewMedicalName);
            Delay.Milliseconds(100);

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(10));
            Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            // ReAssign new Medical Name to its old value
            Report.Log(ReportLevel.Info, "Get Value", "ReAssign new Medical Name to its old value\r\nGetting attribute 'Text' from item 'FrmAddMedicalAlert.Category' and assigning its value to variable 'Category'.", repo.FrmAddMedicalAlert.CategoryInfo, new RecordItemIndex(11));
            Category = repo.FrmAddMedicalAlert.Category.Element.GetAttributeValueText("Text");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddMedicalAlert.Details' at Center.", repo.FrmAddMedicalAlert.DetailsInfo, new RecordItemIndex(12));
            repo.FrmAddMedicalAlert.Details.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$Details' with focus on 'FrmAddMedicalAlert.Details'.", repo.FrmAddMedicalAlert.DetailsInfo, new RecordItemIndex(13));
            repo.FrmAddMedicalAlert.Details.PressKeys(Details);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddMedicalAlert.OK' at Center.", repo.FrmAddMedicalAlert.OKInfo, new RecordItemIndex(14));
            repo.FrmAddMedicalAlert.OK.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Validation", "Validating Exists on item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItem'.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItemInfo, new RecordItemIndex(15));
            Validate.Exists(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.MedicalAlertListItemInfo);
            Delay.Milliseconds(0);
        }
コード例 #7
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            // Click on Add Allergy button
            Report.Log(ReportLevel.Info, "Mouse", "Click on Add Allergy button\r\nMouse Left Click item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AddDrugAllergyCI' at Center.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AddDrugAllergyCIInfo, new RecordItemIndex(0));
            repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AddDrugAllergyCI.Click();
            Delay.Milliseconds(200);

            // Enter same Allergy Name
            Report.Log(ReportLevel.Info, "Mouse", "Enter same Allergy Name\r\nMouse Left Click item 'FrmAddDrugAllergy.AllergyName' at Center.", repo.FrmAddDrugAllergy.AllergyNameInfo, new RecordItemIndex(1));
            repo.FrmAddDrugAllergy.AllergyName.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$AllergyName'.", new RecordItemIndex(2));
            Keyboard.Press(AllergyName);
            Delay.Milliseconds(100);

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(3));
            Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            // Store this name to use for Edit
            Report.Log(ReportLevel.Info, "Get Value", "Store this name to use for Edit\r\nGetting attribute 'Text' from item 'FrmAddDrugAllergy.AllergyName' and assigning its value to variable 'NameToEdit'.", repo.FrmAddDrugAllergy.AllergyNameInfo, new RecordItemIndex(4));
            NameToEdit = repo.FrmAddDrugAllergy.AllergyName.Element.GetAttributeValueText("Text");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddDrugAllergy.OK' at Center.", repo.FrmAddDrugAllergy.OKInfo, new RecordItemIndex(5));
            repo.FrmAddDrugAllergy.OK.Click();
            Delay.Milliseconds(200);

            // Check Duplicate validation message
            MedicalAlertAllergyCollection.CheckDupplicateDrugLCassConditionName(AlertClass);
            Delay.Milliseconds(0);

            // Click OK on Error poppup
            Report.Log(ReportLevel.Info, "Mouse", "Click OK on Error poppup\r\nMouse Left Click item 'Error.ButtonOK' at Center.", repo.Error.ButtonOKInfo, new RecordItemIndex(7));
            repo.Error.ButtonOK.Click();
            Delay.Milliseconds(200);

            // E ter new Allergy name
            Report.Log(ReportLevel.Info, "Mouse", "E ter new Allergy name\r\nMouse Left Click item 'FrmAddDrugAllergy.AllergyName' at Center.", repo.FrmAddDrugAllergy.AllergyNameInfo, new RecordItemIndex(8));
            repo.FrmAddDrugAllergy.AllergyName.Click();
            Delay.Milliseconds(200);

            UserCodeCollection_OR.Clear_TextBox(repo.FrmAddDrugAllergy.AllergyNameInfo, "Text");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$NewAllergyNAme'.", new RecordItemIndex(10));
            Keyboard.Press(NewAllergyNAme);
            Delay.Milliseconds(100);

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Enter' Press.", new RecordItemIndex(11));
            Keyboard.Press(System.Windows.Forms.Keys.Return, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            // ReAssign new allergy name to old Allergyy name
            ReAssignNewAllergyName(NewAllergyNAme);
            Delay.Milliseconds(0);

            // Adverse Reaction; Possible Contraindication; Contraindication; Possible Allergy; Allergy
            Report.Log(ReportLevel.Info, "Mouse", "Adverse Reaction; Possible Contraindication; Contraindication; Possible Allergy; Allergy\r\nMouse Left Click item 'FrmAddDrugAllergy.WarningType' at Center.", repo.FrmAddDrugAllergy.WarningTypeInfo, new RecordItemIndex(13));
            repo.FrmAddDrugAllergy.WarningType.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddDrugAllergy.AllergyDetails' at Center.", repo.FrmAddDrugAllergy.AllergyDetailsInfo, new RecordItemIndex(14));
            repo.FrmAddDrugAllergy.AllergyDetails.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$AllergyDetails'.", new RecordItemIndex(15));
            Keyboard.Press(AllergyDetails);
            Delay.Milliseconds(100);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'FrmAddDrugAllergy.OK' at Center.", repo.FrmAddDrugAllergy.OKInfo, new RecordItemIndex(16));
            repo.FrmAddDrugAllergy.OK.Click();
            Delay.Milliseconds(200);

            // Check new Allergy is added succesfully
            Report.Log(ReportLevel.Info, "Validation", "Check new Allergy is added succesfully\r\nValidating Exists on item 'FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AllergyListItem'.", repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AllergyListItemInfo, new RecordItemIndex(17));
            Validate.Exists(repo.FrmORMain.Patient_Details.Medical_Alerts_and_Allergies.AllergyListItemInfo);
            Delay.Milliseconds(0);
        }