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
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public String CaptureRefCode()
        {
            seleniumFunc.WaitForElementToBeVisible(ks2PortalPage.ReferenceCode);
            var refno = seleniumFunc.GetText(ks2PortalPage.ReferenceCode);

            log.Info("The refernce code of form is :" + refno);
            return(refno);
        }
Example #3
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 String Validate_Form_Title()
 {
     try
     {
         seleniumFunc.WaitForElementToBeVisible(chOrgSch.FormTitle);
         String pageTitle = chOrgSch.FormTitle.Text;
         Console.WriteLine("uiTitle : " + pageTitle);
         return(pageTitle);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.StackTrace);
         Assert.Fail("Test Case Failed in method: Validate_Form_Title");
         return(null);
     }
 }