public void SelectCondition(string Condition, string ConditionDetail, string TypeOfDetail, string IsSelected) { //Only select option for conditions which need to be selected if (IsSelected == "Yes") { // Click on Condition Report.Log(ReportLevel.Info, "Mouse", "Click on Condition: " + Condition, repo.MainWindow.ActiveProblems.PopupWindows.Conditions.ConditionInfo, new RecordItemIndex(2)); repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition.Click(); Delay.Milliseconds(100); if (TypeOfDetail == "Text") // If detail of condition is text, Enter note detail in textbox { Report.Log(ReportLevel.Info, "Mouse", "Enter a note: " + ConditionDetail, repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition_NoteInfo, new RecordItemIndex(2)); repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition_Note.Click(); //Clear old data first if existed AcutePainCollection.Clear_TextBox(repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition_NoteInfo, "Text"); // enter new data Keyboard.Press(ConditionDetail); Delay.Milliseconds(100); } else if (TypeOfDetail == "Radio") // if Detail of condition is option, click on this option { Report.Log(ReportLevel.Info, "Mouse", "Select an option: " + ConditionDetail, repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition_OptionInfo, new RecordItemIndex(2)); repo.MainWindow.ActiveProblems.PopupWindows.Conditions.Condition_Option.Click(); Delay.Milliseconds(100); } } }
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); // Select View Round Report.Log(ReportLevel.Info, "Mouse", "Select View Round\r\nMouse Left Click item 'MainWindow.SearchPatientScreen.ReviewRound' at Center.", repo.MainWindow.SearchPatientScreen.ReviewRoundInfo, new RecordItemIndex(0)); repo.MainWindow.SearchPatientScreen.ReviewRound.Click(); Delay.Milliseconds(200); // Select "All Active" SAFERSleepAPCollection.SelectReviewRound(ValueConverter.ArgumentFromString <int>("ReviewRound", "0"), repo.MainWindow.SearchPatientScreen.ReviewRoundInfo); Delay.Milliseconds(0); AcutePainCollection.Clear_TextBox(repo.MainWindow.SearchPatientScreen.NHIInfo, "Text"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$NHI'.", new RecordItemIndex(3)); Keyboard.Press(NHI); Delay.Milliseconds(100); // Click on Search //Report.Log(ReportLevel.Info, "Mouse", "Click on Search\r\nMouse Left Click item 'MainWindow.SearchPatientScreen.Search' at Center.", repo.MainWindow.SearchPatientScreen.SearchInfo, new RecordItemIndex(4)); //repo.MainWindow.SearchPatientScreen.Search.Click(); //Delay.Milliseconds(200); // Ward View OFF Report.Log(ReportLevel.Info, "Mouse", "Ward View OFF\r\nMouse Left Click item 'MainWindow.SearchPatientScreen.WardView' at Center.", repo.MainWindow.SearchPatientScreen.WardViewInfo, new RecordItemIndex(5)); repo.MainWindow.SearchPatientScreen.WardView.Click(); Delay.Milliseconds(200); // Verify Search result Report.Log(ReportLevel.Info, "Validation", "Verify Search result\r\nValidating Exists on item 'MainWindow.SearchPatientScreen.PatientNHISearch'.", repo.MainWindow.SearchPatientScreen.PatientNHISearchInfo, new RecordItemIndex(6)); Validate.Exists(repo.MainWindow.SearchPatientScreen.PatientNHISearchInfo); Delay.Milliseconds(0); // Click on Patient record Report.Log(ReportLevel.Info, "Mouse", "Click on Patient record\r\nMouse Left Click item 'MainWindow.SearchPatientScreen.PatientNHISearch' at Center.", repo.MainWindow.SearchPatientScreen.PatientNHISearchInfo, new RecordItemIndex(7)); repo.MainWindow.SearchPatientScreen.PatientNHISearch.Click(); Delay.Milliseconds(200); }