public static int hasPermissionToSearchCurrentPupil(SeleniumHelper.iSIMSUserType userType, string textForSearch)
        {
            SeleniumHelper.Login(userType);
            TaskMenuBar taskMenuInstance = new TaskMenuBar();

            taskMenuInstance.WaitForTaskMenuBarButton();
            AddressBookSearchPage searchBox = new AddressBookSearchPage();

            searchBox.ClearText();
            searchBox.EnterSearchTextForPupils(textForSearch);
            int resultCount = searchBox.CheckForResultsAvailability(textForSearch);

            return(resultCount);
        }
        public void CheckResultCountForNonExistingPupils() //For invalid pupils
        {
            AddressBookSearchPage searchBox = QuickSearch.QuickSearchNavigation();

            searchBox.ClearText();
            searchBox.EnterSearchTextForPupils(InvalidtextForSearch);
            int resultCount = searchBox.CheckForResultsAvailability(InvalidtextForSearch);

            Assert.That(resultCount == 0);
            if (true)
            {
                WebContext.Screenshot();
            }
        }
        public void IdentifyResultForLeaver() //For invalid pupils
        {
            AddressBookSearchPage searchBox = QuickSearch.QuickSearchNavigation();

            searchBox.ClearText();
            searchBox.EnterSearchTextForPupils(leaverPupil);
            int    resultCount        = searchBox.CheckForResultsAvailability(leaverPupil);
            String NoElementtileTitle = SeleniumHelper.Get("result_tile_scroll").Text;

            Assert.True(NoElementtileTitle == AddressBookConstants.TitleForNoResultsfound, "No results found diddn't appear"); //Assertion for title if records are not found
            if (true)
            {
                WebContext.Screenshot();
            }
        }