Пример #1
0
        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();
        }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }