Beispiel #1
0
        public void DeleteProfile()
        {
            //Populate data from Excel
            ExcelLibHelpers.PopulateInCollection(Paths.ExcelPath, "Profile");

            //Wait for all text present in Element
            WaitHelpers.WaitForTextPresentInElement(driver, profileName, ExcelLibHelpers.ReadData(3, "Column18"), 10);

            #region Delete Language
            //Delete the last record
            LanguageTab.Click();
            LanguageDeleteBtn.Click();
            #endregion

            #region Delete Skills
            //Delete last record
            SkillTab.Click();
            SkillDeleteBtn.Click();
            #endregion

            #region Delete Education
            //Delete last record
            EducationTab.Click();
            EducationDeleteBtn.Click();
            #endregion

            #region Delete Certification
            //Delete last record
            CertificationTab.Click();
            CertificateDeleteBtn.Click();
            #endregion
        }
Beispiel #2
0
        public void VerifyEnterProfileEducation()
        {
            //Populate data saved in Excel
            ExcelLibHelpers.PopulateInCollection(Paths.ExcelPath, "Profile");

            //Refresh the page
            driver.Navigate().Refresh();
            //Wait for all text present in Element
            WaitHelpers.WaitForTextPresentInElement(driver, profileName, ExcelLibHelpers.ReadData(3, "Column18"), 10);

            #region Verify Education
            //Jump to Education tab
            EducationTab.Click();
            //Verify Education Country
            var lastRowEducationCountry = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[4]//div[2]//tbody[last()]/tr/td[1]")).Text;
            Assert.IsTrue(lastRowEducationCountry.Contains(ExcelLibHelpers.ReadData(3, "Column7")));

            //Verify Education Name
            var lastRowEducationName = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[4]//div[2]//tbody[last()]/tr/td[2]")).Text;
            Assert.IsTrue(lastRowEducationName.Contains(ExcelLibHelpers.ReadData(3, "Column6")));

            //Verify Education Title
            var lastRowEducationTitle = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[4]//div[2]//tbody[last()]/tr/td[3]")).Text;
            Assert.IsTrue(lastRowEducationTitle.Contains(ExcelLibHelpers.ReadData(3, "Column8")));

            //Verify Education Degree
            var lastRowEducationDegree = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[4]//div[2]//tbody[last()]/tr/td[4]")).Text;
            Assert.IsTrue(lastRowEducationDegree.Contains(ExcelLibHelpers.ReadData(3, "Column9")));

            //Verify Education Graduation Year
            var lastRowEducationGraduationYear = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[4]//div[2]//tbody[last()]/tr/td[5]")).Text;
            Assert.IsTrue(lastRowEducationGraduationYear.Contains(ExcelLibHelpers.ReadData(3, "Column10")));
            #endregion
        }
Beispiel #3
0
        public void VerifyEnterProfileCertifications()
        {
            //Populate data saved in Excel
            ExcelLibHelpers.PopulateInCollection(Paths.ExcelPath, "Profile");

            //Refresh the page
            driver.Navigate().Refresh();
            //Wait for all text present in Element
            WaitHelpers.WaitForTextPresentInElement(driver, profileName, ExcelLibHelpers.ReadData(3, "Column18"), 10);

            #region Verify Certifications
            //Jump to Certification tab
            CertificationTab.Click();
            //Verify Certificate Name
            var lastRowCertificateName = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[5]//div[2]//tbody[last()]/tr/td[1]")).Text;
            Assert.IsTrue(lastRowCertificateName.Contains(ExcelLibHelpers.ReadData(3, "Column12")));

            //Verify Certificate Issuing Place
            var lastRowCertificateFrom = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[5]//div[2]//tbody[last()]/tr/td[2]")).Text;
            Assert.IsTrue(lastRowCertificateFrom.Contains(ExcelLibHelpers.ReadData(3, "Column13")));

            //Verify Certificate Year
            var lastRowCertificateYear = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[5]//div[2]//tbody[last()]/tr/td[3]")).Text;
            Assert.IsTrue(lastRowCertificateYear.Contains(ExcelLibHelpers.ReadData(3, "Column14")));
            #endregion
        }
Beispiel #4
0
        public void VerifyEnterProfileLanguage()
        {
            //Populate data saved in Excel
            ExcelLibHelpers.PopulateInCollection(Paths.ExcelPath, "Profile");

            //Refresh the page
            driver.Navigate().Refresh();
            //Wait for all text present in Element
            WaitHelpers.WaitForTextPresentInElement(driver, profileName, ExcelLibHelpers.ReadData(3, "Column18"), 10);

            #region Verify Enter Language
            //Verify Language Name
            var lastRowLanguageName = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[2]//div[2]//tbody[last()]/tr/td[1]")).Text;
            Assert.IsTrue(lastRowLanguageName.Contains(ExcelLibHelpers.ReadData(3, "Column0")));

            //Verify Language Level
            var lastRowLanguageLevel = driver.FindElement(By.XPath("//*[@id='account-profile-section']" + "/div/section[2]//div[3]/form/div[2]//div[2]//tbody[last()]/tr/td[2]")).Text;
            Assert.IsTrue(lastRowLanguageLevel.Contains(ExcelLibHelpers.ReadData(3, "Column1")));
            #endregion
        }
Beispiel #5
0
        public void VerifyDeleteProfile()
        {
            //Populate data saved in Excel
            ExcelLibHelpers.PopulateInCollection(Paths.ExcelPath, "Profile");

            //Refresh the page
            driver.Navigate().Refresh();
            //Wait for all text present in Element
            WaitHelpers.WaitForTextPresentInElement(driver, profileName, ExcelLibHelpers.ReadData(3, "Column18"), 10);

            #region Verify Delete Language
            //Jump to Language tab
            LanguageTab.Click();
            //Read data saved in Excel
            var languageExcel = ExcelLibHelpers.ReadData(3, "Column1");
            try
            {
                //Find the last row data
                driver.FindElement(By.XPath("//div[@data-tab='first']" + "//table/tbody[last()]/tr//*[contains(text(), '" + languageExcel + "')]"));
                Assert.Fail("Failed to delete language");
            }
            catch (NoSuchElementException)
            {
            }
            #endregion

            #region Verify Delete Skills
            //Jump to Skill tab
            SkillTab.Click();
            //Read Skill saved in Excel
            var skillExcel = ExcelLibHelpers.ReadData(3, "Column3");
            try
            {
                //Check the last row data
                driver.FindElement(By.XPath("//div[@data-tab='second']" + "//table/tbody[last()]/tr//*[contains(text(), '" + skillExcel + "')]"));
                Assert.Fail("Failed to delete skill");
            }
            catch (NoSuchElementException)
            {
            }
            #endregion

            #region Verify Delete Education
            //Jump to Education tab
            EducationTab.Click();

            //Read Education info saved in excel
            var instituteNameExcel         = ExcelLibHelpers.ReadData(3, "Column6");
            var instituteCountryExcel      = ExcelLibHelpers.ReadData(3, "Column7");
            var instituteTitleExcel        = ExcelLibHelpers.ReadData(3, "Column8");
            var instituteDegreeExcel       = ExcelLibHelpers.ReadData(3, "Column9");
            var instituteGraduateYearExcel = ExcelLibHelpers.ReadData(3, "Column10");
            try
            {
                //Find the last row data
                driver.FindElement(By.XPath("//div[@data-tab='third']" + "//table/tbody[last()]/tr//*[contains(text(), '" + instituteCountryExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='third']" + "//table/tbody[last()]/tr//*[contains(text(), '" + instituteTitleExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='third']" + "//table/tbody[last()]/tr//*[contains(text(), '" + instituteDegreeExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='third']" + "//table/tbody[last()]/tr//*[contains(text(), '" + instituteGraduateYearExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='third']" + "//table/tbody[last()]/tr//*[contains(text(), '" + instituteNameExcel + "')]"));

                Assert.Fail("Failed to delete education.");
            }
            catch (NoSuchElementException)
            {
            }
            #endregion

            #region Verify Delete Certificate
            //Jump to Certification tab
            CertificationTab.Click();

            //Read Education info saved in excel
            var certificateNameExcel = ExcelLibHelpers.ReadData(3, "Column12");
            var certificateFromExcel = ExcelLibHelpers.ReadData(3, "Column13");
            var certificateYearExcel = ExcelLibHelpers.ReadData(3, "Column14");
            try
            {
                //Find the last row data
                driver.FindElement(By.XPath("//div[@data-tab='fourth']" + "//table/tbody[last()]/tr//*[contains(text(), '" + certificateNameExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='fourth']" + "//table/tbody[last()]/tr//*[contains(text(), '" + certificateFromExcel + "')]"));
                driver.FindElement(By.XPath("//div[@data-tab='fourth']" + "//table/tbody[last()]/tr//*[contains(text(), '" + certificateYearExcel + "')]"));

                Assert.Fail("Failed to delete certificate.");
            }
            catch (NoSuchElementException)
            {
            }
            #endregion
        }