public void PromptToSaveChangesOnNavigationToOtherScreen() { #region Data Pupil Setup #region Create a new pupil, so that it can be attached later to the newly created contact1 AutomationSugar.Log("Data Creation started"); Guid pupilId = Guid.NewGuid(); DataPackage dataPackage = this.BuildDataPackage(); var pupilSurname = Utilities.GenerateRandomString(10, "LinkForPupil2"); var pupilForename = Utilities.GenerateRandomString(10, "LinkForPupil2" + Thread.CurrentThread.ManagedThreadId); dataPackage.AddBasicLearner(pupilId, pupilSurname, pupilForename, new DateTime(2005, 10, 01), new DateTime(2012, 08, 01)); #endregion DataSetup DataSetPupil = new DataSetup(purgeBeforeInsert: false, purgeAfterTest: true, packages: dataPackage); #endregion SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); NavigateToOtherScreen.GoToRoomScreen(); RoomPage SchoolRoomPage = new RoomPage(); SchoolRoomPage.CreateSchoolRoom(); SchoolRoomPage.EnterShortName("Rm60"); AddressBookSearchPage searchBox = new AddressBookSearchPage(); searchBox.ClearText(); searchBox.EnterSearchTextForPupils(pupilForename); AddressBookPopup popup = searchBox.ClickOnFirstPupilRecord(); popup.ClickPupilDetailsLink(); popup.WaitForConfirmationDialogToAppear(); WebContext.Screenshot(); bool DialogDisplayed = SeleniumHelper.Get("save_continue_commit_dialog").Displayed; Assert.IsTrue(DialogDisplayed, "Failure to popup confirmation Dialog"); }
public void PromptSaveChangesPupilContact() { SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator); NavigateToOtherScreen.GoToRoomScreen(); RoomPage SchoolRoomPage = new RoomPage(); SchoolRoomPage.CreateSchoolRoom(); SchoolRoomPage.EnterShortName("Rm60"); AddressBookSearchPage searchBox = new AddressBookSearchPage(); searchBox.ClearText(); searchBox.EnterSearchTextForPupilContacts("Jonathan"); searchBox.ClickOnFirstPupilContactRecord(); //Bug 30498 AddressBookPopup popup = new AddressBookPopup(); popup.ClickPupilContactsDetailsLink(); popup.WaitForConfirmationDialogToAppear(); WebContext.Screenshot(); bool DialogDisplayed = SeleniumHelper.Get("save_continue_commit_dialog").Displayed; Assert.IsTrue(DialogDisplayed, "Failure to popup confirmation Dialog"); }
public static bool TestAddressBookLinkPresenceForTGScreen() { NavigateToOtherScreen.GoToTGScreen(); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }
public static bool TestAddressBookLinkPresenceForPupilScreenViaQuickAccess() { NavigateToOtherScreen.GoToPupilRecordScreen(); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }
public static bool TestAddressBookLinkPresenceForPupilScreen(bool senFlag = false) { NavigateToOtherScreen.PupilScreenOnTaskMenu(senFlag); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }