public void EditRoom() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); #region CREATE THIS USING WEB SERVICES schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("Rm60"); schoolRoomPage.EnterLongName("Test for Room 60"); schoolRoomPage.EnterTelephoneNo("9527725936"); schoolRoomPage.EnterRoomArea("10000"); schoolRoomPage.EnterMaxaxGroupSize("10000"); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved")); #endregion //Search room to edit SearchAndClickRoom(schoolRoomPage, "RM60", "Test for Room 60"); //SearchResults.WaitForResults(); ////Perform the actual test here i.e. Edit searched room schoolRoomPage.ReEnterShortName("ERM61"); schoolRoomPage.ReEnterLongName("Test for Edit Room 61"); schoolRoomPage.ReEnterTelephoneNo("9999999999"); schoolRoomPage.ReEnterRoomArea("99999"); schoolRoomPage.ReEnterMaxaxGroupSize("9999"); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved")); //Currently deleting the created room here itself in this test. schoolRoomPage.DeleteRoomRecord(); }
public void ValidationDuplicateRoomLongName() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("TT1"); schoolRoomPage.EnterLongName("DU Room Long Name"); schoolRoomPage.Save(); schoolRoomPage.WaitForCreateButttonToAppear(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.WaitForCancelButttonToAppear(); schoolRoomPage.EnterShortName("TT2"); schoolRoomPage.EnterLongName("DU Room Long Name"); schoolRoomPage.Save(); IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); schoolRoomPage.ClickCancelButton(); schoolRoomPage.ClickDontSaveButton(); schoolRoomPage.EnterShortNameSearchPanel("TT1"); schoolRoomPage.EnterLongNameSearchPanel("DU Room Long Name"); schoolRoomPage.ClickSeachRoomButton(); SearchResults.WaitForResults(); schoolRoomPage.ClickSearchResults(); schoolRoomPage.DeleteRoomRecord(); }
public void RoomLongNameMaxFieldLength() { RoomPage schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.WaitForCancelButttonToAppear(); Assert.IsTrue(schoolRoomPage.Longname.GetAttribute("maxlength") == "32"); }
public void ValidationActiveCheck() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.WaitForCancelButttonToAppear(); var checkbox = WebContext.WebDriver.FindElement(RoomElements.CheckBoxActive); Assert.That(checkbox.GetAttribute("checked") != null); }
public void ValidationRoomLongName() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("V20"); schoolRoomPage.EnterLongName(""); schoolRoomPage.Save(); IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }
public void ValidationInactiveCheck() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("INA09"); schoolRoomPage.EnterLongName("Test for inactive 09"); schoolRoomPage.UncheckActiveCheckBox(); var includeInactiveRoomCheckbox = WebContext.WebDriver.FindElement(RoomElements.IncludeInactiveRooms); Assert.That(includeInactiveRoomCheckbox.GetAttribute("checked") == null); }
public void ValidationGroupSizeBelowLimit0() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("VA26"); schoolRoomPage.EnterLongName("Group less than 0"); schoolRoomPage.EnterMaxaxGroupSize("-1"); schoolRoomPage.Save(); IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }
public void ValidationAreaBelowLimit() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("VA26"); schoolRoomPage.EnterLongName("Area Exceed Limit"); schoolRoomPage.EnterRoomArea("-1"); schoolRoomPage.Save(); IWebElement ValidationWarning = SeleniumHelper.Get(RoomElements.RoomValidationWarning); Assert.IsTrue(ValidationWarning.Displayed, "Validation Warning"); }
public void CreateRoom() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("CRM22"); schoolRoomPage.EnterLongName("Test for Create Room 22"); schoolRoomPage.EnterTelephoneNo("9527725936"); schoolRoomPage.EnterRoomArea("10000"); schoolRoomPage.EnterMaxaxGroupSize("10000"); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("school room record saved")); //Currently deleting the created room here itself in this test. SearchAndClickRoom(schoolRoomPage, "CRM22", "Test for Create Room 22"); schoolRoomPage.DeleteRoomRecord(); }
public void CreateInactiveRoom() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("INA09"); schoolRoomPage.EnterLongName("Test for inactive 09"); schoolRoomPage.UncheckActiveCheckBox(); var includeInactiveRoomCheckbox = WebContext.WebDriver.FindElement(RoomElements.IncludeInactiveRooms); Assert.That(includeInactiveRoomCheckbox.GetAttribute("checked") == null); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("school room record saved")); //Currently deleting the created room here itself in this test. schoolRoomPage.DeleteRoomRecord(); }
public void SearchRoomByShortName() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); #region CREATE THIS USING WEB SERVICES //CREATE ROOM TO SEARCH schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("SRT00"); schoolRoomPage.EnterLongName("Search RM Short Name 00"); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved")); #endregion //Actual test i.e. Search the room by Room Short Name by created by the Web Service schoolRoomPage.EnterShortNameSearchPanel("SRT00"); schoolRoomPage.ClickSeachRoomButton(); SearchResults.WaitForResults(); Assert.IsTrue(SearchResults.HasResults(1)); //Currently deleting the created room here itself in this test. schoolRoomPage.DeleteRoomRecord(); }
public void DeleteRoom() { var schoolRoomPage = FacilitiesNavigation.NavigateToRoomPage(); #region CREATE THIS USING WEB SERVICES schoolRoomPage.CreateSchoolRoom(); schoolRoomPage.EnterShortName("DL88"); schoolRoomPage.EnterLongName("Test for Delete Room 88"); schoolRoomPage.EnterTelephoneNo("9527725936"); schoolRoomPage.EnterRoomArea("10000"); schoolRoomPage.EnterMaxaxGroupSize("10000"); schoolRoomPage.Save(); Assert.IsTrue(schoolRoomPage.HasConfirmedSave("School room record saved")); #endregion schoolRoomPage.DeleteRoomRecord(); schoolRoomPage.EnterShortNameSearchPanel("DL88"); schoolRoomPage.EnterLongNameSearchPanel("Test for Delete Room 88"); schoolRoomPage.ClickSeachRoomButton(); Assert.IsTrue(SearchResults.HasResults(0)); }