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 Delete_Visit() { // Login as School Adminstrator SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); Wait.WaitForDocumentReady(); // Navigate to Visitor Book Screen AutomationSugar.NavigateMenu("Tasks", "Communications", "Visitors Book"); Wait.WaitForDocumentReady(); //Search Visit var visitTriplet = new ManageVisitTriplet(); visitTriplet.SearchCriteria.SearchByVisitorName = ("Visitor_"); var searchResult = visitTriplet.SearchCriteria.Search().FirstOrDefault(); var manageVisitPage = searchResult.Click <ManageVisitDetail>(); //Delete Visit visitTriplet.Delete(); }