Exemplo n.º 1
0
        /// <summary>
        /// Searches TCC for an either an applicant or recommender depending on what is passed in for `personType`.
        /// If no type is specified, throws exception.
        /// </summary>
        /// <param name="personType">The type of person to search for. Either an applicant or recommender</param>
        /// <param name="emailLike">Full or partial email address</param>
        /// <param name="firstNameLike">Full or partial first name</param>
        /// <param name="lastNameLike">Full or partial last name</param>
        /// <param name="idLike">Full or partial identification number</param>
        /// <param name="postalCodeLike">Full or partial postal code. Note: only for applicant</param>
        /// <param name="ceebCode">Full CEEB Code. Note: only for applicant</param>
        public void SearchForPerson(string personType, string emailLike, string firstNameLike, string lastNameLike, string idIncludes, string postalCodeLike, string ceebCode)
        {
            GoToSearchPage();

            // Are we searching for an applicant or recommender?
            switch (personType.ToLower())
            {
            case "applicant":
            case "applicants":
            case "app":
                // Enter provided applicant info
                EnterSharedInfo(emailLike, firstNameLike, lastNameLike);
                _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "txtCAID_fil", idIncludes);
                _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "txtZipCode_fil", postalCodeLike);
                _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "txtCEEBCode_fil", ceebCode);
                break;

            case "recommender":
            case "recommenders":
            case "rec":
                // Change tab to "Recommenders" page
                _utilsValidation.SelectDropdownItem(personType);

                // Enter provided recommender info
                EnterSharedInfo(emailLike, firstNameLike, lastNameLike);
                _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "txtRecommederId_fil", idIncludes);
                break;

            default:
                throw new Exception("No `personType` specified.");
            }

            // Click search button
            _utilsValidation.Click(DriverUtilities.ElementAccessorType.ID, "aApplicantSearch");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Logs into my TCC account
        /// </summary>
        public void LoginUser(string email, string password)
        {
            _driver.Navigate().GoToUrl(PageValidation.MainPage);
            _driver.Manage().Window.Maximize();

            _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "Username", email);
            _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "Password", password);
            _utilsValidation.Click(DriverUtilities.ElementAccessorType.ClassName, "btn-primary");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Search for a member from the Member List page.
        /// </summary>
        /// <param name="name">Target member to search for</param>
        public void MemberSearch(string name)
        {
            _userLoginLogout.LoginUser(_userData.GetEmail(), _userData.GetPassword());

            // Enter member name into search box
            _utilsValidation.EnterText(DriverUtilities.ElementAccessorType.ID, "member-list-filter", name + Keys.Enter);

            // Click result link
            _utilsValidation.ExplicitWait(DriverUtilities.ElementAccessorType.XPath, "//*[@data-bind='text: Name']", 30);
            _utilsValidation.Click(DriverUtilities.ElementAccessorType.XPath, "//*[@data-bind='text: Name']");
        }