//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; } } }
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); }