public void EditCompetency(string fromStatus, string toStatus) { string compName = CreateCompetency(fromStatus, true); SearchCompetency(compName); CompetencyActionEditButton.Click(); Thread.Sleep(5000); formSubmitType = "Edited and Updated"; compName = CreateCompetency(toStatus, false); Thread.Sleep(3000); SearchCompetency(compName); }
public void VerifyActionsButton_CompetencyListPage() { if (CompetencyList.Count > 0) { bool searchResult = true; for (int i = 1; i <= CompetencyList.Count; i++) { IWebElement editButton = driver.FindElement(By.XPath("//table/tbody/tr[" + i + "]/td[4]/a[contains(text(),'Edit')]")); if (!editButton.Displayed) { searchResult = false; break; } } Assert.IsTrue(searchResult, "Edit buttons has not been displayed appropriately in the Competencies List Grid"); ExtentReport.test.Log(LogStatus.Pass, "Edit buttons has been displayed appropriately in the Competencies List Grid"); string cName = CompetencyName.Text; Thread.Sleep(2000); CompetencyActionDownButton.Click(); Thread.Sleep(4000); ExtentReport.test.Log(LogStatus.Info, "<b>" + cName + "</b> - Down button clicked and moved the competency down by one row in the Competencies List Grid"); CompetencyActionUpButton.Click(); Thread.Sleep(4000); ExtentReport.test.Log(LogStatus.Info, "<b>" + cName + "</b> - Up button clicked and moved the competency up by one row in the Competencies List Grid"); CompetencyActionEditButton.Click(); Thread.Sleep(6000); Assert.IsTrue(CompetencyEdit_Popup.Displayed, "Edit button click is not opening the Competency Edit popup properly in the Competencies List Grid"); ExtentReport.test.Log(LogStatus.Pass, "Edit button click is opening the Competency Edit popup properly in the Competencies List Grid"); CloseButton_Popup.Click(); Thread.Sleep(3000); } }