Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
 public static bool TestAddressBookLinkPresenceForTGScreen()
 {
     NavigateToOtherScreen.GoToTGScreen();
     return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch)));
 }
Esempio n. 4
0
 public static bool TestAddressBookLinkPresenceForPupilScreenViaQuickAccess()
 {
     NavigateToOtherScreen.GoToPupilRecordScreen();
     return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch)));
 }
Esempio n. 5
0
 public static bool TestAddressBookLinkPresenceForPupilScreen(bool senFlag = false)
 {
     NavigateToOtherScreen.PupilScreenOnTaskMenu(senFlag);
     return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch)));
 }