public void AddNonExistingPatient(int patientid) { flag = false; Console.WriteLine("------------Searching for the patient " + patientid + " ------------"); search.SearchPatient("duplicatepatients.csv", patientid); Thread.Sleep(5000); if (!search.IsSearchEmpty()) { Console.WriteLine("Patient Found in PSC!!"); tabs.Dashboard(); flag = true; Console.WriteLine("---------------------------------------------------------------------------\n"); Assert.Ignore("Result: Ignoring this patient as this already exist in PSC"); } if (flag == false) { Console.WriteLine("Patient doesn't exist on PSC, So adding the patient"); flag = bip.AddPatient(filename, patientid); Thread.Sleep(2000); if (!standard.Save()) { Console.WriteLine("Result: Not able to add new patient as patient information is not correct in one or more basic info fields"); Console.WriteLine(" INFO: Please check the screenshot for more information"); bip.GoToDashBoard(); Console.WriteLine("---------------------------------------------------------------------------\n"); Assert.Ignore(); } Thread.Sleep(4000); flag = bip.VerifyPatientAdded(); Thread.Sleep(2000); bip.GoToDashBoard(); Assert.Pass(); } }
public void GoBackToDashBoard() { Console.WriteLine("All tests have been finished, Going back to DashBoard"); Thread.Sleep(2000); tabs.Dashboard(); Thread.Sleep(4000); standard.Ok(); }
public void AddNonExistingPatient() { if (search.IsSearchEmpty() && patientid < 3) { Console.WriteLine("Not able to search the patient, So adding the patient"); search.AddNewPatient(); Thread.Sleep(5000); BasicInfoPage bip = new BasicInfoPage(currentWindow); bip.ProvideBasicInformation("patientadditionalinfo.csv", patientid); Thread.Sleep(2000); standard.Save(); Thread.Sleep(3000); tabs.Dashboard(); Thread.Sleep(2000); standard.Ok(); } }
public bool ValidateInformation() { if (bip.VerifyBasicInfoField()) { flag = true; Console.WriteLine("---------------------------------- TEST PASSED -------------------------------------------\n"); Console.WriteLine("Result: Patient information able to save Test Passed"); Console.WriteLine("\n--------------------------------------------------------------------------------\n"); if (count == patientids.Length - 1) { Console.WriteLine("All Test have been finished, Going to Dashboard"); Thread.Sleep(2000); tabs.Dashboard(); Thread.Sleep(3000); standard.Ok(); count = -1; } return(flag); } else { flag = false; Console.WriteLine("\n-------------------------------------- TEST FAILED --------------------------------------------------"); Console.WriteLine("Result: Patient information not able to save, Test Failed"); Console.WriteLine("\n--------------------------------------------------------------------------------\n"); if (count == patientids.Length - 1) { Console.WriteLine("All Test have been finished, Going to Dashboard"); Thread.Sleep(2000); tabs.Dashboard(); Thread.Sleep(3000); standard.Ok(); count = -1; } return(flag); } }