Beispiel #1
0
 public SearchResultsPage Search(string searchTerm)
 {
     _objectContext.Set("searchedTerm", searchTerm);
     _formHelper.EnterText(SearchField, searchTerm);
     _formHelper.ClickElement(SubmitSearch);
     return(new SearchResultsPage(_context));
 }
Beispiel #2
0
 public SearchResultsPage SearchOnJobProfile(string searchTerm)
 {
     _objectContext.Set("JPSearchTerm", searchTerm);
     _formHelper.EnterText(JPSearchField, searchTerm);
     _formHelper.ClickElement(SubmitJPSearch);
     return(new SearchResultsPage(_context));
 }
        public FirstContactFormPage EnterQuery(string strQuery)
        {
            string option = _objectContext.Get("SelectOption");

            if (option.Equals("Contact an adviser", StringComparison.OrdinalIgnoreCase))
            {
                _formHelper.EnterText(Message, strQuery);
            }
            else if (option.Equals("Give feedback", StringComparison.OrdinalIgnoreCase))
            {
                _formHelper.EnterText(Feedback, strQuery);
            }
            return(this);
        }
Beispiel #4
0
 public SearchApprenticeshipPage EnterSearchTerm(string searchTerm)
 {
     FormCompletionHelper.EnterText(searchInput, searchTerm);
     FormCompletionHelper.ClickElement(searchButton);
     PageInteractionHelper.WaitForPageToLoad();
     return(new SearchApprenticeshipPage(webDriver));
 }
Beispiel #5
0
 public EditCoursePage2 EnterCourseCost(string cost)
 {
     //FormCompletionHelper.ClearContents(courseCost);
     PageInteractionHelper.WaitForPageToLoad();
     FormCompletionHelper.EnterText(courseCost, cost);
     return(new EditCoursePage2(webDriver));
 }
 public ReferralCheckAnswersPage EnterPlacementInformationClickContinueMoreThanOneOpportunityExists()
 {
     FormCompletionHelper.EnterText(JobTypeField, Constants.jobTitle);
     SelectNoRadioButton();
     ScenarioContext.Current["_provisionGapJobType"] = "None given";
     FormCompletionHelper.ClickElement(ContinueButton);
     return(new ReferralCheckAnswersPage(webDriver));
 }
Beispiel #7
0
 public EnterJobsPage EnterJob(string job)
 {
     _objectContext.Set("searchedTerm", job);
     _formHelper.EnterText(TextEntryJob, job);
     System.Threading.Thread.Sleep(5000);
     _pageHelper.IsElementPresent(DropdownResults).Should().BeTrue();
     return(this);
 }
 internal void AddNewVenueData()
 {
     FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Venue.VENUE_ID)), Venue.ProviderId);
     FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Venue.VENUE_NAME)), Venue.VenueName);
     FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Venue.VENUE_POSTCODE)), Venue.PostCode);
     webDriver.FindElement(By.XPath(Venue.FIND_ADDRESS)).Click();
     PageInteractionHelper.TurnOnSleep();
     FormCompletionHelper.SelectFromDropDownByIndex(webDriver.FindElement(By.XPath(Venue.ADDRESS_DROPDOWN)), 2);
     webDriver.FindElement(By.XPath(Venue.CREATE_VENUE_BUTTON)).Click();
     ValidatePageSuccess(webDriver.FindElement(By.XPath(Venue.ADD_VENUE_SUCCESS_MSG)).Text);
 }
 internal void SelectLARSNumber()
 {
     // webDriver.FindElement(By.CssSelector(".modal"));
     PageInteractionHelper.TurnOnSleep();
     webDriver.FindElement(By.XPath(Courses.YES_LARS_RADIO)).Click();
     FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.LARS_NUMBER_TEXT)), Courses.Course_LARS_No);
     PageInteractionHelper.TurnOnSleep();
     webDriver.FindElement(By.XPath(Courses.LARS_NUMBER_TEXT)).SendKeys(Keys.Down);
     webDriver.FindElement(By.XPath(Courses.LARS_NUMBER_TEXT)).SendKeys(Keys.Enter);
     webDriver.FindElement(By.XPath(Courses.LARS_CONTINUE_BUTTON)).Click();
 }
        internal void Login(TestUser user)
        {
            FormCompletionHelper.EnterText(_emailAddress, user.Email);
            FormCompletionHelper.EnterText(_password, user.Password);

            FormCompletionHelper.ClickElement(_signInButton);

            // var loading = new EmployerIdamsLodingPage(WebDriver);

            //  loading


            //  return new PsrsHomepage(WebDriver);
        }
 internal void AddNewCourseData(string strLars)
 {
     if (strLars == "No")
     {
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_TITLE_TEXT)), Courses.Course_Title);
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_ID_TEXT)), Courses.Course_Id);
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_SUMMARY_TEXT)), Courses.Course_Summary);
         FormCompletionHelper.SelectFromDropDownByIndex(webDriver.FindElement(By.XPath(Courses.COURSE_QUAL_TYPE_ID)), 5);
         FormCompletionHelper.SelectFromDropDownByIndex(webDriver.FindElement(By.XPath(Courses.COURSE_QUAL_LEVEL)), 5);
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_URL)), Courses.Course_URL);
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_ENTRY_REQS)), Courses.Course_Entry);
     }
     else
     {
         AddNewCourseDataWithLARS();
     }
     webDriver.FindElement(By.XPath(Courses.CREATE_COURSE)).Click();
     ValidatePageSuccess(webDriver.FindElement(By.XPath(Courses.ADD_COURSE_SUCCESS_MSG)).Text);
 }
Beispiel #12
0
        public EditCoursePage2 EnterStartDate(string value, string field)
        {
            switch (field)
            {
            case "Day":
                FormCompletionHelper.EnterText(DateDD, value);
                return(new EditCoursePage2(webDriver));

            case "Month":
                FormCompletionHelper.EnterText(DateMM, value);
                return(new EditCoursePage2(webDriver));

            case "Year":
                FormCompletionHelper.EnterText(DateCCYY, value);
                return(new EditCoursePage2(webDriver));

            default:
                throw new Exception("Field does not exist");
            }
        }
 private void AddNewCourseDataWithLARS()
 {
     if (string.IsNullOrEmpty(webDriver.FindElement(By.XPath(Courses.COURSE_TITLE_TEXT)).Text))
     {
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_TITLE_TEXT)), Courses.Course_Title);
     }
     if (string.IsNullOrEmpty(webDriver.FindElement(By.XPath(Courses.COURSE_SUMMARY_TEXT)).Text))
     {
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_SUMMARY_TEXT)), Courses.Course_Summary);
     }
     if ((webDriver.FindElement(By.XPath(Courses.COURSE_QUAL_TYPE_ID)).Text != "Please Select"))
     {
         FormCompletionHelper.SelectFromDropDownByIndex(webDriver.FindElement(By.XPath(Courses.COURSE_QUAL_TYPE_ID)), 5);
     }
     if (string.IsNullOrEmpty(webDriver.FindElement(By.XPath(Courses.COURSE_URL)).Text))
     {
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_URL)), Courses.Course_URL);
     }
     if (string.IsNullOrEmpty(webDriver.FindElement(By.XPath(Courses.COURSE_ENTRY_REQS)).Text))
     {
         FormCompletionHelper.EnterText(webDriver.FindElement(By.XPath(Courses.COURSE_ENTRY_REQS)), Courses.Course_Entry);
     }
 }
 public AddCoursePage EnterWhoCourseFor(String whoText)
 {
     FormCompletionHelper.EnterText(courseFor, whoText);
     return(new AddCoursePage(webDriver));
 }
 private void EnterPostcode(string postcode)
 {
     FormCompletionHelper.EnterText(PostcodeField, postcode);
     ScenarioContext.Current["_provisionGapPostcode"] = postcode;
 }
Beispiel #16
0
 internal FindACoursePage EnterLocation(String locationTxt)
 {
     FormCompletionHelper.EnterText(location, locationTxt);
     return(new FindACoursePage(webDriver));
 }
Beispiel #17
0
 internal FindACoursePage EnterCourseName(String courseTxt)
 {
     FormCompletionHelper.EnterText(courseName, courseTxt);
     return(new FindACoursePage(webDriver));
 }
Beispiel #18
0
 internal void EnterWhereNext(string strData)
 {
     FormCompletionHelper.EnterText(WhereNextText, strData);
 }
Beispiel #19
0
 internal void EnterHowYouWillBeAssessed(string strData)
 {
     FormCompletionHelper.EnterText(HowAssessedText, strData);
 }
Beispiel #20
0
 internal void EnterWhatYouWillNeedToBring(string strData)
 {
     FormCompletionHelper.EnterText(WhatYouNeedText, strData);
 }
Beispiel #21
0
 internal void EnterHowYouWillLearn(string strData)
 {
     FormCompletionHelper.EnterText(HowYouWillLearnText, strData);
 }
 public AddCoursePage HowAssessed(String assessment)
 {
     FormCompletionHelper.EnterText(howAssessed, assessment);
     return(new AddCoursePage(webDriver));
 }
 public AddCoursePage EnterHowYoullLearn(String howText)
 {
     FormCompletionHelper.EnterText(howWillLearn, howText);
     return(new AddCoursePage(webDriver));
 }
 public AddCoursePage EnterEntryRequirements(String entryText)
 {
     FormCompletionHelper.EnterText(entryRequirements, entryText);
     return(new AddCoursePage(webDriver));
 }
 public AddCoursePage EnterWhatWillLearn(String whatText)
 {
     FormCompletionHelper.EnterText(whatWillLearn, whatText);
     return(new AddCoursePage(webDriver));
 }
Beispiel #26
0
 internal void EnterWhatWillYouLearn(string strData)
 {
     FormCompletionHelper.EnterText(WhatWillLearnText, strData);
 }
 public AddCoursePage EnterEquipmentNeeded(String equipText)
 {
     FormCompletionHelper.EnterText(equipmentNeeded, equipText);
     return(new AddCoursePage(webDriver));
 }
Beispiel #28
0
 internal void EnterCourseDescription(string strData)
 {
     FormCompletionHelper.EnterText(CourseForText, strData);
 }
 public AddCoursePage NextSteps(String nextsteps)
 {
     FormCompletionHelper.EnterText(nextSteps, nextsteps);
     return(new AddCoursePage(webDriver));
 }
Beispiel #30
0
 internal void EnterEntryRequirements(string strData)
 {
     FormCompletionHelper.EnterText(EntryReqText, strData);
 }