public void Visit_E2E() { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); Wait.WaitForDocumentReady(); // Navigate to Visitor Book Screen AutomationSugar.NavigateMenu("Tasks", "Communications", "Visitors Book"); Wait.WaitForDocumentReady(); //Adding a Visit var visitTriplet = new ManageVisitTriplet(); var visitDetailPage = visitTriplet.Create(); visitDetailPage.VisitorName = "Delete Visitor"; visitDetailPage.VisitNote = "VisitNoteDescription"; visitDetailPage.StartDate = DateTime.Now.ToString("M/d/yyyy"); visitDetailPage.IsAllday = true; //Saving visitDetailPage.Save(); Assert.AreEqual(false, visitDetailPage.IsSuccessMessageDisplayed(), "Visit record saved"); //Visit Search visitTriplet.SearchCriteria.SearchByVisitorName = ("Delete Visitor"); var searchResult = visitTriplet.SearchCriteria.Search().FirstOrDefault(); var manageVisitPage = searchResult.Click <ManageVisitDetail>(); //Delete Visit visitTriplet.Delete(); }
public void Add_Visit_allday() { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); Wait.WaitForDocumentReady(); // Navigate to Visitor Book Screen AutomationSugar.NavigateMenu("Tasks", "Communications", "Visitors Book"); Wait.WaitForDocumentReady(); //Adding a Visit var visitTriplet = new ManageVisitTriplet(); var visitDetailPage = visitTriplet.Create(); visitDetailPage.VisitorName = "Visitor_" + SeleniumHelper.GenerateRandomString(10); visitDetailPage.VisitNote = "VisitNoteDescription_" + SeleniumHelper.GenerateRandomString(20); visitDetailPage.StartDate = DateTime.Now.ToString("M/d/yyyy"); visitDetailPage.IsAllday = true; //Saving visitDetailPage.Save(); Assert.AreEqual(false, visitDetailPage.IsSuccessMessageDisplayed(), "Visit record saved"); }
public void Visit_Date_Validation() { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); Wait.WaitForDocumentReady(); // Navigate to Visitor Book Screen AutomationSugar.NavigateMenu("Tasks", "Communications", "Visitors Book"); Wait.WaitForDocumentReady(); //Adding a Visit var visitTriplet = new ManageVisitTriplet(); var visitDetailPage = visitTriplet.Create(); visitDetailPage.VisitorName = "Visitor_" + SeleniumHelper.GenerateRandomString(10); visitDetailPage.IsAllday = false; //Saving visitDetailPage.Save(); var ValidationWarning = SeleniumHelper.Get(ManageVisitDetail.ValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }