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)); }
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"); }