//Add Certification internal void AddCertification() { //explicit wait GlobalDefinitions.WaitForClickableElement(driver, By.XPath("//a[text()='Certifications']"), 30); //click on certification tab CertificationsButton.Click(); GlobalDefinitions.wait(30); //add new certification AddNewCertification.Click(); GlobalDefinitions.wait(30); //add value in certificate field and certification from CertificationText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certificate")); CertifiedFromText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertifiedFrom")); //select certificate year selectdropdown("certificationYear", GlobalDefinitions.ExcelLib.ReadData(2, "CertificationYear")); btnAddCertification.Click(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(15); }
//update operation performs on Certification field internal void UpdateCertification() { ExtentionHelpers.TurnOnWait(driver); //click the pen icon to edit CerficationUpdate.Click(); ExtentionHelpers.TurnOnWait(driver); // clear text and enter value CertificationText.Clear(); CertificationText.SendKeys(ExcelLibHelper.ReadData(4, "Certificate")); CertifiedFromText.Clear(); CertifiedFromText.SendKeys(ExcelLibHelper.ReadData(4, "Certified from")); selectdropdown1("certificationYear", ExcelLibHelper.ReadData(4, "CertificationYear")); //click on update button UpdateButton.Click(); ExtentionHelpers.TurnOnWait(driver); Console.WriteLine(driver.FindElement(By.XPath("//div[contains(@class,'ns-box-inner')]")).Text); driver.FindElement(By.XPath("//a[contains(@class,'ns-close')]")); Console.WriteLine("*******************************"); }
//update operation performs on Certification field internal void UpdateCertification() { //explicit wait GlobalDefinitions.WaitForClickableElement(driver, By.XPath("//a[text()='Certifications']"), 30); //click on certification tab CertificationsButton.Click(); GlobalDefinitions.wait(30); //click the pen icon to edit CerficationUpdate.Click(); GlobalDefinitions.wait(30); // clear text and enter value CertificationText.Clear(); CertificationText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Certificate")); CertifiedFromText.Clear(); CertifiedFromText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "CertifiedFrom")); selectdropdown("certificationYear", GlobalDefinitions.ExcelLib.ReadData(3, "CertificationYear")); //click on update button UpdateButton.Click(); GlobalDefinitions.wait(30); //Console.WriteLine(driver.FindElement(By.XPath("//div[contains(@class,'ns-box-inner')]")).Text); //driver.FindElement(By.XPath("//a[contains(@class,'ns-close')]")); Console.WriteLine("*******************************"); }
//Add Certification internal void AddCertification1() { Console.WriteLine("******************************"); // CertificationsButton.Click(); ExtentionHelpers.TurnOnWait(driver); //add new certification AddNewCertification.Click(); ExtentionHelpers.TurnOnWait(driver); //add value in certificate field and certification from CertificationText.SendKeys(ExcelLibHelper.ReadData(3, "Certificate")); CertifiedFromText.SendKeys(ExcelLibHelper.ReadData(3, "Certified from")); //select certificate year selectdropdown1("certificationYear", ExcelLibHelper.ReadData(3, "CertificationYear")); AddCertification.Click(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(15); }