コード例 #1
0
        public void FillUserCreationForm(string option, string userType, string email, string FirstName, string SurName, string Jobtitle, string TelePhoneNumber)
        {
            if (option == "New")
            {
                seleniumFunc.WaitAndClickOnElement(SQAPortal.CreateNewSQA);
                seleniumFunc.WaitForPageToLoad();
                comFunc.NaviagteToNextPage();

                seleniumFunc.WaitAndEnterText(SQAPortal.SQAFirstName, FirstName);
                seleniumFunc.WaitAndEnterText(SQAPortal.SQALastName, SurName);
                seleniumFunc.WaitAndEnterText(SQAPortal.JobTitle, Jobtitle);
                seleniumFunc.WaitAndEnterText(SQAPortal.SQAEmailAdd, email + Keys.Tab);
                seleniumFunc.WaitForPageToLoad();

                seleniumFunc.WaitAndEnterText(SQAPortal.SQAConfirmEmail, email);
                seleniumFunc.WaitAndEnterText(SQAPortal.SQAContactNo, TelePhoneNumber);
                SelectUserType(userType);
            }
            else if (option == "Update")
            {
                seleniumFunc.WaitAndClickOnElement(SQAPortal.UpdateExistingSQA);
                seleniumFunc.WaitForPageToLoad();
                comFunc.NaviagteToNextPage();
                seleniumFunc.WaitAndClickOnElement(SQAPortal.SQASuperUser);
            }
            comFunc.NaviagteToNextPage();
            comFunc.SubmitForm();
        }
コード例 #2
0
ファイル: ModifiedKS2Lib.cs プロジェクト: tushar2209/POM
        /// <summary>
        ///
        /// </summary>
        ///
        public void ClickOnStartApplication()
        {
            // HandleCookiePopup();

            seleniumFunc.WaitAndClickOnElement(ModifiedKS2.StartFormBtn);
            seleniumFunc.WaitForPageToLoad();
        }
コード例 #3
0
        public void FillUserCreationForm(string option, string userType, string email, string FirstName, string SurName, string Jobtitle, string TelePhoneNumber)
        {
            if (option == "New")
            {
                seleniumFunc.WaitAndClickOnElement(cmUserCreationPage.CreateNewContactRadio);
                seleniumFunc.WaitForPageToLoad();
                comFunc.NaviagteToNextPage();

                seleniumFunc.WaitAndEnterText(cmUserCreationPage.NewContactFirstName[0], FirstName);
                seleniumFunc.WaitAndEnterText(cmUserCreationPage.NewContactSurname[0], SurName);
                seleniumFunc.WaitAndEnterText(cmUserCreationPage.JobTitle[0], Jobtitle);
                seleniumFunc.WaitAndEnterText(cmUserCreationPage.EmailAdd[0], email + Keys.Tab);
                seleniumFunc.WaitForPageToLoad();

                seleniumFunc.WaitAndEnterText(cmUserCreationPage.ConfirmEmailAdd[0], email);
                seleniumFunc.WaitAndEnterText(cmUserCreationPage.TelephoneNo[0], TelePhoneNumber);
                selectUserType(userType);
            }
            else if (option == "Update")
            {
                seleniumFunc.WaitAndClickOnElement(cmUserCreationPage.UpdateContactRadio);
                seleniumFunc.WaitForPageToLoad();
                comFunc.NaviagteToNextPage();
                seleniumFunc.WaitAndClickOnElement(cmUserCreationPage.SuperUserCheckbox[1]);
            }
            comFunc.NaviagteToNextPage();
        }
コード例 #4
0
 public void AddPupil(String PupilUPN, String PupilFN, String PupilMN, String PupilLN, String DOB, String pupilGender)
 {
     log.Info("Adding New Pupil");
     seleniumFunc.WaitAndClickOnElement(managePupil.AddPupilBtn);
     seleniumFunc.WaitForPageToLoad();
     seleniumFunc.WaitAndEnterText(managePupil.AddPupilUPN, PupilUPN);
     seleniumFunc.WaitAndEnterText(managePupil.PupilFName, PupilFN);
     seleniumFunc.WaitAndEnterText(managePupil.PupilMName, PupilMN);
     seleniumFunc.WaitAndEnterText(managePupil.PupilLName, PupilLN);
     SelectGender(pupilGender);
     comFunc.SelectDateFromDatePicker(managePupil.PupilDOB, DOB);
 }
コード例 #5
0
 public void FillEventLogOFDownloadForm(string documentName, string formDate, string toDate)
 {
     seleniumFunc.SelectValueFromDropDwn(eventLogsOfDownloadPage.DoucmentSDropDwn, documentName);
     comFunc.SelectDateFromDatePicker(eventLogsOfDownloadPage.FromDate, formDate);
     comFunc.SelectDateFromDatePicker(eventLogsOfDownloadPage.ToDate, toDate);
     seleniumFunc.WaitAndClickOnElement(eventLogsOfDownloadPage.SearchBtn);
     seleniumFunc.WaitForPageToLoad();
 }
コード例 #6
0
        public void UploadDocuments(string fileName, IWebElement ele)
        {
            string path        = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
            string actualPath  = path.Substring(0, path.LastIndexOf("bin"));
            string projectPath = new Uri(actualPath).LocalPath;
            string filePath    = Path.Combine(projectPath, "Resources\\" + fileName);

            seleniumFunc.EnterTextWithoutClear(ele, filePath);
            seleniumFunc.WaitForPageToLoad();
        }
コード例 #7
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);
        }
コード例 #8
0
        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);
                }
            }
        }
コード例 #9
0
 public void FillCallBackForm(bool CallBackRequired, string DateOfFollowUpToCall, string TimeOfFollowUpToCall, string AgentNote)
 {
     if (CallBackRequired)
     {
         seleniumFunc.WaitAndClickOnElement(outBoundCustomerContactPage.OutcomeRadioBtns[1]);
         seleniumFunc.WaitForPageToLoad();
         comFunc.SelectDateFromDatePicker(outBoundCustomerContactPage.DateOfFollowUpToCall[3], DateOfFollowUpToCall);
         seleniumFunc.WaitAndEnterText(outBoundCustomerContactPage.TimeOfFollowUpToCallTextbox, TimeOfFollowUpToCall);
         seleniumFunc.WaitAndEnterText(outBoundCustomerContactPage.AgentNotesTextArea, AgentNote + 2);
     }
     else
     {
         seleniumFunc.WaitAndClickOnElement(outBoundCustomerContactPage.OutcomeRadioBtns[0]);
     }
 }
コード例 #10
0
 /// <summary>
 /// Method to CHeck
 /// </summary>
 /// <param name="isIndependetSchool"></param>
 public void CheckPrivacyNotice(bool isIndependetSchool)
 {
     if (isIndependetSchool)
     {
         seleniumFunc.ScrollElementInView(ModifiedKS1Page.ConfirmedPrivecyNoticeIssuedRadionBtn);
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should display.");
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should display.");
         seleniumFunc.WaitAndClickOnElement(ModifiedKS1Page.PrivecyNoticeNotIssuedRadiobtn);
         seleniumFunc.WaitForPageToLoad();
         VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.PrivecyNoticeNotIssuedErrorMsg), "Check error message should dispaly when 'Privacy notices have not been issued' raido button selected.");
     }
     else
     {
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should not display.");
         VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should not display.");
     }
 }
コード例 #11
0
        public void CheckContactDetailsFiledsValue(string firstName, string lastName, string JobeTitle, string TelPhone, string emailAddress)
        {
            seleniumFunc.WaitForPageToLoad();

            /*string ActualfirstName = specialConsiderationPage.ContactFirstName.GetAttribute("value");
             * string ActualLastName = specialConsiderationPage.ContactLastName.GetAttribute("value");
             * string ActualJobTitle = specialConsiderationPage.JobTitle.GetAttribute("value");
             * string ActualTeleNum = specialConsiderationPage.TelephoneNumber.GetAttribute("value");
             * string ActualEmailAdd = specialConsiderationPage.EmailAddress.GetAttribute("value");
             */


            VerifyIsEquals(firstName, seleniumFunc.GetAttributeValue(specialConsiderationPage.ContactFirstName, "value"), "Check Contact FirstName");
            VerifyIsEquals(lastName, seleniumFunc.GetAttributeValue(specialConsiderationPage.ContactLastName, "value"), "Check Contact lastName");
            VerifyIsEquals(JobeTitle, seleniumFunc.GetAttributeValue(specialConsiderationPage.JobTitle, "value"), "Check Contact JobeTitle");
            VerifyIsEquals(TelPhone, seleniumFunc.GetAttributeValue(specialConsiderationPage.TelephoneNumber, "value"), "Check Contact TelPhone");
            VerifyIsEquals(emailAddress, seleniumFunc.GetAttributeValue(specialConsiderationPage.EmailAddress, "value"), "Check Contact emailAddress");
        }
コード例 #12
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);
        }
コード例 #13
0
 public void StartApplication()
 {
     seleniumFunc.SwitchToFrame("repair-frame");
     seleniumFunc.WaitForPageToLoad();
 }
コード例 #14
0
 public void SubmitForm()
 {
     seleniumFunc.ClickOnElement(notificationPage.SubmitBtn);
     seleniumFunc.WaitForPageToLoad();
 }
コード例 #15
0
 public void DeletePreviouslyUploadTestMaterial()
 {
     seleniumFunc.WaitForPageToLoad();
     foreach (IWebElement ele in uploadTestMaterialPage.DeleteCheckBoxes)
     {
         seleniumFunc.WaitAndClickOnElement(ele);
     }
     comFunc.NaviagteToNextPage();
 }