Exemple #1
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;

            int index = Medication.IndexOf("(");

            if (index > 0)
            {
                Medication = Medication.Substring(0, index - 1);
            }
            MyRepo.Medication = Medication;

            Ranorex.Report.Info("Validate Co-Analgesia Medication: " + Medication);
            Validate.Exists(MyRepo.MainWindow.Modalities.AdvancedModalities.AddedCoAnalgesiaInfo);

            if (Dose != "")
            {
                Ranorex.Report.Info("Validate Loading Dose: " + Dose + " " + Unit);
                Validate.AttributeContains(MyRepo.MainWindow.Modalities.AdvancedModalities.AddedCoAnalgesiaInfo, "caption", "Loading dose: " + Dose + " " + Unit);
            }

            if (Rate != "")
            {
                Ranorex.Report.Info("Validate Continuous Rate: " + Rate + " " + Unit + "/hr");
                Validate.AttributeContains(MyRepo.MainWindow.Modalities.AdvancedModalities.AddedCoAnalgesiaInfo, "caption", "Continuous rate: " + Rate + " " + Unit);
            }

            if (DoseLimit != "")
            {
                Ranorex.Report.Info("Validate " + hr + " hr Dose Limit: " + DoseLimit + " " + Unit);
                Validate.AttributeContains(MyRepo.MainWindow.Modalities.AdvancedModalities.AddedCoAnalgesiaInfo, "caption", hr + " hr dose limit: " + DoseLimit + " " + Unit);
            }
        }
        public void Mouse_Click_AddedCoAnalgesia(RepoItemInfo textInfo)
        {
            int index = Medication.IndexOf("(");

            if (index > 0)
            {
                Medication = Medication.Substring(0, index - 1);
            }
            repo.Medication = Medication;
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'textInfo' at Center.", textInfo);
            textInfo.FindAdapter <Text>().Click();
        }