Exemple #1
0
        public void EditEduaction()
        {
            {
                Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddSkills");
                GlobalDefinitions.Wait();
                EducationLink.Click();

                //for editing Education details
                IList <IWebElement> rows = GlobalDefinitions.driver.FindElements(By.XPath(".//tr"));

                //This loop finds the first row which' title matches sRowValue
                for (int i = 1; i < rows.Count; i++)
                {
                    String sValue = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'MIT')]")).Text;
                    if (sValue == "MIT")
                    {
                        IWebElement Edit = GlobalDefinitions.driver.FindElement(By.XPath("//tbody[1]//tr[1]//td[6]//span[1]//i[1]"));
                        Edit.Click();
                        //EditEdu.Click();
                        EnterUniversity.Clear();
                        EnterUniversity.SendKeys(ExcelLib.ReadData(7, "College"));
                        //Select Title from Dropdown
                        IWebElement   TitleLevelDrpdwn    = GlobalDefinitions.driver.FindElement(By.XPath("//select[@name='title']"));
                        SelectElement chooseEduTitleLevel = new SelectElement(TitleLevelDrpdwn);
                        var           EduTitleLevelData   = ExcelLib.ReadData(rowNum, "Title");
                        chooseEduTitleLevel.SelectByValue(EduTitleLevelData);
                        UpdateEdu.Click();
                        break;
                    }
                }
            }

            IWebElement UpdateAlertPopup = GlobalDefinitions.driver.FindElement(By.ClassName("ns-box-inner"));
            String      AlertText        = UpdateAlertPopup.Text;

            GlobalDefinitions.Wait();
            Assert.IsTrue(AlertText.Contains("updated"));
            Console.WriteLine(AlertText);
            //Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Education Updated successfully");
            var ScreenshotPath = Global.SaveScreenshot.SaveScreenshotClass(GlobalDefinitions.driver, "Skills deleted successfully");
        }
Exemple #2
0
        internal void EduEdit()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[@data-tab='third']"));
            //Click Education tab
            ClickEdu.Click();
            EditEdu.Click();

            //Edit University
            University.Clear();
            University.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "University"));

            //Edit Country
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//select[@name='country'])"));
            SelectElement Edit = new SelectElement(Country);

            Edit.SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "Country"));
            // Country.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Country"));

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//select[@name='title'])"));
            //Edit Title
            // EditTitle.Click();
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Edit Degree
            Degree.Clear();
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Degree"));

            //Edit year
            //EditYear.Click();
            Year.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "YearOfGraduation"));

            //Click update
            UpdateEdu.Click();
        }