Esempio n. 1
0
        public void SearchSiteAddressPostCode()
        {
            Random rns                     = new Random();
            var    stsnum                  = rns.Next(100);
            var    siteshortname           = "ST" + stsnum;
            Random rnl                     = new Random();
            var    stlnum                  = rnl.Next(1000);
            var    sitelongname            = "SL" + stlnum;
            MySchoolDetailsPage schoolPage = FacilitiesNavigation.NavigatetoMySchoolDetailPage();

            schoolPage.ExpandSchoolSitebldng();
            AddSchoolSitepopupPage sitepopup = schoolPage.ClickAddSchoolSitebldnglink();

            sitepopup.EnterSiteShortName(siteshortname);
            sitepopup.EnterSiteLongName(sitelongname);
            AddSchoolBuildingPopupPage BuildingPopup = sitepopup.ClickAddBuilding();

            BuildingPopup.ClickAddNewAddress();
            AddressSearchPage SearchPage = new AddressSearchPage();

            SearchPage.EnterPostNumber("BT57 8RR");
            SearchPage.ClickSearchButton();
            SearchResults.WaitForResults();
            Assert.IsTrue(SearchResults.HasResults(1));
        }
Esempio n. 2
0
        public void AddSchoolsite()
        {
            Random rns                     = new Random();
            var    stsnum                  = rns.Next(100);
            var    siteshortname           = "ST01" + stsnum;
            Random rnl                     = new Random();
            var    stlnum                  = rnl.Next(100);
            var    sitelongname            = "ST01" + stlnum;
            MySchoolDetailsPage schoolPage = FacilitiesNavigation.NavigatetoMySchoolDetailPage();

            schoolPage.ExpandSchoolSitebldng();
            AddSchoolSitepopupPage sitepopup = schoolPage.ClickAddSchoolSitebldnglink();

            sitepopup.EnterSiteShortName(siteshortname);
            sitepopup.EnterSiteLongName(sitelongname);
            sitepopup.EnterContactName("Adair");
            sitepopup.EnterTelephoneNumber("9527725936");
            sitepopup.EnterMobileNumber("9527725936");
            sitepopup.EnterFaxNumber("5246");
            sitepopup.EnterEmailAddress("*****@*****.**");
            sitepopup.EnterWebsiteAddress("www.capita.co.uk");
            sitepopup.ClickOkButton();
            schoolPage.Save();
            Assert.IsTrue(schoolPage.HasConfirmedSave("My School Details Saved"));
        }
Esempio n. 3
0
        public void ValidationSiteLongName()
        {
            MySchoolDetailsPage schoolRoomPage = FacilitiesNavigation.NavigatetoMySchoolDetailPage();

            schoolRoomPage.ExpandSchoolSitebldng();
            AddSchoolSitepopupPage sitepopup = schoolRoomPage.ClickAddSchoolSitebldnglink();

            sitepopup.EnterSiteShortName("ST1");
            sitepopup.EnterSiteLongName("");
            sitepopup.ClickOkButton();
            var ValidationWarning = SeleniumHelper.Get(MySchoolDetailsElements.ValidationWarning);

            Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning");
        }
Esempio n. 4
0
        public void BldnEmailMaxFieldValidation()
        {
            Random rns                     = new Random();
            var    stsnum                  = rns.Next(100);
            var    siteshortname           = "ST" + stsnum;
            Random rnl                     = new Random();
            var    stlnum                  = rnl.Next(1000);
            var    sitelongname            = "SL" + stlnum;
            MySchoolDetailsPage schoolPage = FacilitiesNavigation.NavigatetoMySchoolDetailPage();

            schoolPage.ExpandSchoolSitebldng();
            AddSchoolSitepopupPage sitepopup = schoolPage.ClickAddSchoolSitebldnglink();

            sitepopup.EnterSiteShortName(siteshortname);
            sitepopup.EnterSiteLongName(sitelongname);
            AddSchoolBuildingPopupPage BuildingPopup = sitepopup.ClickAddBuilding();

            Assert.IsTrue(BuildingPopup.Emailaddress.GetAttribute("maxlength") == "254");
        }