//Update Education on the Profile page public void UpdateEducationOnProfile(string expectedEducationTitle, string university, string country) { IList <IWebElement> rows = driver.WaitForListOfElements(By.XPath("(//table[@class='ui fixed table'])[3]//tbody/tr/td[3]")); for (int rnum = 1; rnum <= rows.Count; rnum++) { string title = null; title = (driver.WaitForElement(By.XPath("(//table[@class='ui fixed table'])[3]//tbody[" + rnum + "]/tr/td[3]"))).Text; if (title == expectedEducationTitle) { //Click on Update icon to update the record driver.WaitForElement(By.XPath("(//table[@class='ui fixed table'])[3]//tbody[" + rnum + "]/tr/td[6]/span[1]/i[@class='outline write icon']")).Click(); //Update University driver.WaitForElementIsVisible(CollegeName); CollegeName.Clear(); CollegeName.SendKeys(university); //Update Country SelectElement selectCountry = new SelectElement(CollegeCountry); selectCountry.SelectByValue(country); //Click on Update button to update the University and Country of Education UpdateButton.Click(); break; } } }
//Add new Education on the Profile page public void AddEducationOnProfile(EducationDetails educationObj) { //Click on AddNew button AddNewEducation.Click(); //Enter Name of College driver.WaitForElementIsVisible(CollegeName); CollegeName.SendKeys(educationObj.University); //Select Country of College SelectElement selectCountry = new SelectElement(CollegeCountry); selectCountry.SelectByValue(educationObj.Country); //Select Title of Education SelectElement selectTitle = new SelectElement(EducationTitle); selectTitle.SelectByValue(educationObj.Title); //Enter Degree of Education EducationDegree.SendKeys(educationObj.Degree); //Select Year of Graduation SelectElement selectYear = new SelectElement(EducationYear); selectYear.SelectByValue(educationObj.Year); //Click on Add button to add Education data AddButton.Click(); }
public bool Equals(Certification cert) { if (CollegeName == null || CollegeId == null || cert == null) { return(false); } return(CollegeName.Equals(cert.College.Prefix, StringComparison.OrdinalIgnoreCase) && CollegeId.Equals(cert.LicenseNumber, StringComparison.OrdinalIgnoreCase)); }
internal async Task<bool> Update(HomeState homeState, ClassStanding classStanding, CollegeName collegeName, Major major) { if (_currentUser != null) { _currentUser.HomeState = homeState; _currentUser.ClassStanding = classStanding; _currentUser.College = collegeName; _currentUser.Major = major; await _usersTable.UpdateAsync(_currentUser); return true; } return false; }
public void AddEduDetail() { //Click on "Education" Education.Click(); Thread.Sleep(1000); //Click on "Add New" button AddNew.Click(); Thread.Sleep(1000); //Enter the "College Name" CollegeName.SendKeys("Weltec"); Thread.Sleep(1000); //Click on the "Country of College Name" //CountryCollege.Click(); //Select the "Country of College Name" IWebElement Country_Name = Driver.driver.FindElement(By.XPath("//select[@name='country']")); SelectElement Country_dd = new SelectElement(Country_Name); Country_dd.SelectByValue("Argentina"); Thread.Sleep(1000); //Click on the "Title" drop down and Select the "Title" IWebElement Title = Driver.driver.FindElement(By.XPath("//select[@name='title']")); SelectElement Title_dd = new SelectElement(Title); Title_dd.SelectByValue("B.Tech"); Thread.Sleep(1000); //Send data to "Degree" textbox Degree.SendKeys("Bachelor of Information technology"); Thread.Sleep(1000); //Click on the "Year of Graduation" drop down and Select the "year" IWebElement Graduation = Driver.driver.FindElement(By.XPath("//select[@name='yearOfGraduation']")); SelectElement Graduation_dd = new SelectElement(Graduation); Graduation_dd.SelectByValue("2016"); Thread.Sleep(1000); //Click on "Add" button to Add all the details in it AddEduBtn.Click(); Thread.Sleep(1000); }
internal void EditEducation() { Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "Education"); Commondriver.Wait(10); EducationEditiconFirst.Click(); CollegeName.Clear(); CollegeName.SendKeys(Commondriver.Excellib.ReadData(3, "CollegeName")); Commondriver.Wait(10); SelectElement country = new SelectElement(CountryDropdown); country.SelectByText(Commondriver.Excellib.ReadData(3, "CountryOfCollege")); SelectElement Titledrop = new SelectElement(TitleDropdown); Titledrop.SelectByText(Commondriver.Excellib.ReadData(3, "TitleDrop")); Degree.Clear(); Degree.SendKeys(Commondriver.Excellib.ReadData(3, "Degree")); Thread.Sleep(3000); SelectElement Yeardrop = new SelectElement(GradutionYearDropDown); Yeardrop.SelectByText(Commondriver.Excellib.ReadData(3, "Year")); Thread.Sleep(3000); UpdateButtonEducationData.Click(); Thread.Sleep(5000); }
internal void AddEducation() { Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "Education"); //Click on Add new button for education Commondriver.Wait(10); EducationAddNew.Click(); //Enter Valid Education details Commondriver.Wait(10); CollegeName.SendKeys(Commondriver.Excellib.ReadData(2, "CollegeName")); SelectElement country = new SelectElement(CountryDropdown); country.SelectByText(Commondriver.Excellib.ReadData(2, "CountryOfCollege")); SelectElement Titledrop = new SelectElement(TitleDropdown); Titledrop.SelectByText(Commondriver.Excellib.ReadData(2, "TitleDrop")); Degree.SendKeys(Commondriver.Excellib.ReadData(2, "Degree")); Thread.Sleep(3000); SelectElement Yeardrop = new SelectElement(GradutionYearDropDown); Yeardrop.SelectByText(Commondriver.Excellib.ReadData(2, "Year")); Thread.Sleep(3000); AddButtonEducationData.Click(); Thread.Sleep(2000); }
internal List<User> Search(HomeState homeState, ClassStanding classStanding, CollegeName collegeName, Major major) { List<User> mentorList = _usersList.Where(User => User.IsMentor).ToList(); if(homeState != HomeState.NA) { mentorList = mentorList.Where(User => User.HomeState == homeState).ToList(); } if(classStanding != ClassStanding.NA) { mentorList = mentorList.Where(User => User.ClassStanding == classStanding).ToList(); } if (collegeName != CollegeName.NA) { mentorList = mentorList.Where(User => User.College == collegeName).ToList(); } if (major != Major.NA) { mentorList = mentorList.Where(User => User.Major == major).ToList(); } mentorList.OrderBy(User => User.College).ThenBy(User => User.Major).ThenBy(User => User.HomeState).ThenBy(User => User.ClassStanding); return mentorList; }