Exemple #1
0
        internal void AddNewEducation()
        {
            // Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            Thread.Sleep(1000);

            // Click the Education tab
            EducationTab.Click();

            // Click the Add New button
            Thread.Sleep(1000);
            EducationNewButton.Click();

            // Input the College/University Name field with valid characers
            InstituteName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "InstituteName"));

            // Input the Country of College/University field valid characers
            CountryName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Country"));

            // Input the Title field valid characers
            TitleName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));

            // Input the Degree field valid characers
            DegreeName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            // Input the Year of graduation field valid characers
            GraduationYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "GraduationYear"));
            Thread.Sleep(500);

            // Click the Add button
            EducationAddButton.Click();
            Base.test.Log(LogStatus.Info, "Education has been added");
            Thread.Sleep(500);

            // Verify if add the new Education successfully
            IWebElement actualtext = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(@class,'ns-type-success')]"));

            Assert.That(actualtext.Text, Is.EqualTo("Education has been added"));
        }