Example #1
0
        public bool CheckMandetoryFields(string fieldName, String ErrorMsg)
        {
            bool value = false;

            switch (fieldName)
            {
            case Scribe:
                seleniumFunc.ClickOnElement(notificationPage.ScribeRadioBtn);
                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox);
                comFunc.SubmitForm();
                seleniumFunc.WaitForElementToBeVisible(notificationPage.NameOFScribeTextBoxErrorMsg[0]);
                //value = notificationPage.NameOFScribeTextBoxErrorMsg.Text.Equals(ErrorMsg) ? true : false;
                VerifyIsEquals(ErrorMsg, seleniumFunc.GetText(notificationPage.NameOFScribeTextBoxErrorMsg[0]), "Check Name of Scribe field error msg");
                VerifyIsEquals(ErrorMsg, seleniumFunc.GetText(notificationPage.HowWasAidUsedErrorMsg[0]), "Check 'How was the aid used?' error msg when Scribe selected");
                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox);
                break;

            case Transcript:
                seleniumFunc.ClickOnElement(notificationPage.TranscriptRadioBtn);
                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox);
                comFunc.SubmitForm();
                seleniumFunc.WaitForElementToBeVisible(notificationPage.NameOfTranscriberTextBoxErrorMsg[0]);
                // value = notificationPage.NameOfTranscriberTextBoxErrorMsg.Text.Equals(ErrorMsg) ? true : false;
                VerifyIsEquals(ErrorMsg, notificationPage.NameOfTranscriberTextBoxErrorMsg[0].Text, "Check Name of Transcript field error msg");
                VerifyIsEquals(ErrorMsg, seleniumFunc.GetText(notificationPage.HowWasAidUsedErrorMsg[0]), "Check 'How was the aid used?' error msg when Transcript selected");

                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox); break;

            case WordProcess:

                seleniumFunc.ClickOnElement(notificationPage.WordProcessorTechEleAidRadioBtn);
                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox);
                comFunc.SubmitForm();
                seleniumFunc.WaitForElementToBeVisible(notificationPage.NameOfTypeOfAidTextBoxErrorMsg[0]);
                // value = notificationPage.NameOfTypeOfAidTextBoxErrorMsg.Text.Equals(ErrorMsg) ? true : false;
                VerifyIsEquals(ErrorMsg, notificationPage.NameOfTypeOfAidTextBoxErrorMsg[0].Text, "Check Name of WordProcess field error msg");
                VerifyIsEquals(ErrorMsg, seleniumFunc.GetText(notificationPage.HowWasAidUsedErrorMsg[0]), "Check 'How was the aid used?' error msg when WordProcess selected");
                seleniumFunc.WaitAndClickOnElement(notificationPage.EnglishGrammarPaper1CheckBox);

                break;

            case BriefExplanation:
                seleniumFunc.ScrollElementInView(notificationPage.TextAreaBox);
                comFunc.SubmitForm();
                seleniumFunc.WaitForElementToBeVisible(notificationPage.BriefExplanationTextAreaErrorMsg);
                // value = notificationPage.BriefExplanationTextAreaErrorMsg.Text.Equals(ErrorMsg) ? true : false;

                VerifyIsEquals(ErrorMsg, notificationPage.BriefExplanationTextAreaErrorMsg.Text, "Check BriefExplanation field error msg");

                break;


            default:
                VerifyIsEquals(ErrorMsg, seleniumFunc.GetText(notificationPage.TypeOfNotificationSectionErrorMsg), "Check Type of Notification field error msg");
                break;
            }

            return(value);
        }
Example #2
0
 public void CheckPrivacyNotice(bool isIndependetSchool)
 {
     if (isIndependetSchool)
     {
         seleniumFunc.ScrollElementInView(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn);
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should display.");
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ksOnePage.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should display.");
     }
     else
     {
         seleniumFunc.ScrollElementInView(ksOnePage.YourEmailAddressTextBox);
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should not display.");
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ksOnePage.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should not display.");
     }
 }
Example #3
0
        /// <summary>
        /// Method to check Madetory fields
        /// </summary>
        public void CheckMandetoryFields()
        {
            comFunc.SubmitForm();

            seleniumFunc.ScrollElementInView(addtionalTimePage.QuestionErrorMsgs[5]);

            VerifyIsTrue(addtionalTimePage.QuestionErrorMsgs.Count == 7, "Check all Questions should Madetory fileds.");
        }
Example #4
0
        /// <summary>
        /// Method to select pupli detail type with subject, date  and time
        /// </summary>
        /// <param name="pupilType">Indivdula/ WholeCohort / Partial Cohort</param>
        /// <param name="subject1"></param>
        /// <param name="Date1"></param>
        /// <param name="time1"></param>
        public void SelectPupilAndTestSubjectDetails(string pupilType, String pupilName, string subject1, string Date1, string time1)
        {
            seleniumFunc.ScrollElementInView(timeTableVarPage.IndividualPupilRadioBtn);
            if (pupilType != null)
            {
                if (pupilType.Equals(WholeCohort))
                {
                    seleniumFunc.WaitAndClickOnElement(timeTableVarPage.WholeCohortRadioBtn);
                }
                else if (pupilType.Equals(PartialCohort))
                {
                    seleniumFunc.WaitAndClickOnElement(timeTableVarPage.PartialCohortRadioBtn);
                    seleniumFunc.WaitForPageToLoad();
                }
                else if (pupilType.Equals(IndividualPupile))
                {
                    seleniumFunc.WaitAndClickOnElement(timeTableVarPage.IndividualPupilRadioBtn);
                }
            }

            seleniumFunc.WaitForElementToBeVisible(timeTableVarPage.SubjectDropDwns[0]);

            if (pupilName != null)
            {
                if (pupilType.Equals(IndividualPupile))
                {
                    seleniumFunc.WaitForElementToBeVisible(timeTableVarPage.PupilSelectionDropDwns[0]);
                    seleniumFunc.SelectValueFromAutoCompliteDropDown(timeTableVarPage.PupilSelectionDropDwns[0], timeTableVarPage.PupilDropDwnOptions, pupilName);
                }
                else if (pupilType.Equals(PartialCohort))
                {
                    seleniumFunc.WaitForElementToBeVisible(timeTableVarPage.PupilSelectionDropDwns[1]);
                    seleniumFunc.WaitForPageToLoad();
                    seleniumFunc.SelectValueFromAutoCompliteDropDown(timeTableVarPage.PupilSelectionDropDwns[1], timeTableVarPage.PupilDropDwnOptions, pupilName);
                }
            }

            SelectSubjectDateAndTime(subject1, Date1, time1);
        }
        public void SelectPupilDetails(string pupilType, string pupilName)
        {
            seleniumFunc.ScrollElementInView(earlyOpeningAppPage.IndividualPupilRadioBtn);
            if (pupilType != null)
            {
                if (pupilType.Equals(WholeCohort))
                {
                    seleniumFunc.WaitAndClickOnElement(earlyOpeningAppPage.WholeCohortRadioBtn);
                }
                else if (pupilType.Equals(PartialCohort))
                {
                    seleniumFunc.WaitAndClickOnElement(earlyOpeningAppPage.PartialCohortRadioBtn);
                    seleniumFunc.WaitForPageToLoad();
                }
                else if (pupilType.Equals(IndividualPupile))
                {
                    seleniumFunc.WaitAndClickOnElement(earlyOpeningAppPage.IndividualPupilRadioBtn);
                }
            }

            seleniumFunc.WaitForPageToLoad();

            if (pupilName != null)
            {
                seleniumFunc.ScrollElementInView(earlyOpeningAppPage.SubjectEngGrammmerCheckBox);

                if (pupilType.Equals(IndividualPupile))
                {
                    seleniumFunc.WaitForElementToBeVisible(earlyOpeningAppPage.PupilSelectionDropDwns[0]);
                    seleniumFunc.SelectValueFromAutoCompliteDropDown(earlyOpeningAppPage.PupilSelectionDropDwns[0], earlyOpeningAppPage.PupilDropDwnOptions, pupilName);
                }
                else if (pupilType.Equals(PartialCohort))
                {
                    seleniumFunc.WaitForElementToBeVisible(earlyOpeningAppPage.PupilSelectionDropDwns[1]);
                    seleniumFunc.SelectValueFromAutoCompliteDropDown(earlyOpeningAppPage.PupilSelectionDropDwns[1], earlyOpeningAppPage.PupilDropDwnOptions, pupilName);
                }
            }
        }
        public void CheckContactDetailsFiledsValue(string firstName, string lastName, string JobeTitle, string TelPhone, string emailAddress)
        {
            string ActualfirstName = chOrgSch.ContactFirstName.GetAttribute("value");
            string ActualLastName  = chOrgSch.ContactLastName.GetAttribute("value");
            string ActualJobTitle  = chOrgSch.JobTitle.GetAttribute("value");
            string ActualTeleNum   = chOrgSch.UserTelephoneNumber.GetAttribute("value");
            string ActualEmailAdd  = chOrgSch.UserEmailAddress.GetAttribute("value");

            seleniumFunc.ScrollElementInView(chOrgSch.TelephoneNumber);
            VerifyIsEquals(firstName, ActualfirstName, "Check Contact FirstName");
            VerifyIsEquals(lastName, ActualLastName, "Check Contact lastName");
            VerifyIsEquals(JobeTitle, ActualJobTitle, "Check Contact JobeTitle");
            VerifyIsEquals(TelPhone, ActualTeleNum, "Check Contact TelPhone");
            VerifyIsEquals(emailAddress, ActualEmailAdd, "Check Contact emailAddress");
        }
Example #7
0
 /// <summary>
 /// Method to CHeck
 /// </summary>
 /// <param name="isIndependetSchool"></param>
 public void CheckPrivacyNotice(bool isIndependetSchool)
 {
     if (isIndependetSchool)
     {
         seleniumFunc.ScrollElementInView(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn);
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should display.");
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should display.");
         seleniumFunc.WaitAndClickOnElement(ModifiedKS2.PrivecyNoticeNotIssuedRadiobtn);
         seleniumFunc.WaitForPageToLoad();
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.PrivecyNoticeNotIssuedErrorMsg), "Check error message should dispaly when 'Privacy notices have not been issued' raido button selected.");
     }
     else
     {
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should not display.");
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Privacy notices have not been issued Radion button should not display.");
     }
 }
Example #8
0
 public void SelectUserRole(string UserRole)
 {
     seleniumFunc.ScrollElementInView(CreateSchool.NormalUserCheckbox);
     if (UserRole != null)
     {
         if (UserRole.Equals(Normal))
         {
             seleniumFunc.WaitAndClickOnElement(CreateSchool.NormalUserCheckbox);
         }
         else if (UserRole.Equals(Super))
         {
             seleniumFunc.WaitAndClickOnElement(CreateSchool.SuperUserCheckbox);
         }
         else if (UserRole.Equals(headteacher))
         {
             seleniumFunc.WaitAndClickOnElement(CreateSchool.HeadTeacherCheckbox);
         }
     }
 }
        public void CheckSelectedSubjects(bool[] subjects)
        {
            string errorMsg  = "";
            int    subjectNo = 1;

            for (int i = 0; i < subjects.Length; i++)
            {
                if (subjects[i])
                {
                    if (!specialConsiderationPage.SubjectsCheckBoxes[i].Selected)
                    {
                        errorMsg = "Subject " + subjectNo + " CheckBox is unchecked.\n";
                    }
                }
                subjectNo++;
            }

            seleniumFunc.ScrollElementInView(specialConsiderationPage.SubjectsCheckBoxes[subjects.Length - 1]);
            VerifyIsEquals("", errorMsg, "Check selected subject checkboxes");
        }
Example #10
0
        public string CheckContactDetailsPrePopulatedFiledsValue(string firstName, string lastName, string JobeTitle, string TelPhone, string emailAddress)
        {
            string missMatchResult = "";

            seleniumFunc.WaitForPageToLoad();
            seleniumFunc.ScrollElementInView(confirmHolidayDatesPage.ContactFirstName);
            string ActualfirstName = confirmHolidayDatesPage.ContactFirstName.GetAttribute("value");
            string ActualLastName  = confirmHolidayDatesPage.ContactLastName.GetAttribute("value");
            string ActualJobTitle  = confirmHolidayDatesPage.JobTitle.GetAttribute("value");
            string ActualTeleNum   = confirmHolidayDatesPage.TelephoneNumber.GetAttribute("value");
            string ActualEmailAdd  = confirmHolidayDatesPage.EmailAddress.GetAttribute("value");



            VerifyIsEquals(firstName, ActualfirstName, "Check Contact FirstName");
            VerifyIsEquals(lastName, ActualLastName, "Check Contact lastName");
            VerifyIsEquals(JobeTitle, ActualJobTitle, "Check Contact JobeTitle");
            VerifyIsEquals(TelPhone, ActualTeleNum, "Check Contact TelPhone");
            VerifyIsEquals(emailAddress, ActualEmailAdd, "Check Contact emailAddress");

/*
 *          if (!firstName.Equals(ActualfirstName))
 *              missMatchResult = "Expected Contact first name :" + firstName + " Actual :" + ActualfirstName + "\n";
 *
 *          if (!lastName.Equals(ActualLastName))
 *              missMatchResult = "Expected Contact Last name :" + lastName + " Actual :" + ActualLastName + "\n";
 *
 *          if (!JobeTitle.Equals(ActualJobTitle))
 *              missMatchResult = "Expected JobeTitle :" + JobeTitle + " Actual :" + ActualJobTitle + "\n";
 *
 *          if (!TelPhone.Equals(ActualTeleNum))
 *              missMatchResult = "Expected TelPhone :" + TelPhone + " Actual :" + ActualTeleNum + "\n";
 *
 *          if (!emailAddress.Equals(ActualEmailAdd))
 *              missMatchResult = "Expected emailAddress :" + emailAddress + " Actual :" + ActualEmailAdd + "\n";
 */
            return(missMatchResult);
        }
Example #11
0
 public void CheckMandetoryFields(string errorMsg)
 {
     seleniumFunc.ScrollElementInView(phonicsZeroOrderPage.ConfirmZeroOrderCheckBoxErrorMsg);
     VerifyIsEquals(errorMsg, seleniumFunc.GetText(phonicsZeroOrderPage.ConfirmZeroOrderCheckBoxErrorMsg), "Check Confirm zero orders for phonics mandetory check box");
 }