public void EditCompetencyLevel(string fromStatus, string toStatus) { string compName = CreateCompetencyLevel(fromStatus, true); SearchCompetencyLevel(compName); CompetencyLevelActionEditButton.Click(); Thread.Sleep(5000); formSubmitType = "Edited and Updated"; compName = CreateCompetencyLevel(toStatus, false); Thread.Sleep(3000); SearchCompetencyLevel(compName); }
public void VerifyActionsButton_CompetencyLevelListPage() { if (CompetencyLevelList.Count > 0) { bool searchResult = true; for (int i = 1; i <= CompetencyLevelList.Count; i++) { IWebElement editButton = driver.FindElement(By.XPath("//table/tbody/tr[" + i + "]/td[3]/a[contains(text(),'Edit')]")); if (!editButton.Displayed) { searchResult = false; break; } } Assert.IsTrue(searchResult, "Edit buttons has not been displayed appropriately in the Competencies Levels Grid"); ExtentReport.test.Log(LogStatus.Pass, "Edit buttons has been displayed appropriately in the Competencies Levels Grid"); string cName = CompetencyLevelName.Text; Thread.Sleep(2000); CompetencyLevelActionDownButton.Click(); Thread.Sleep(4000); ExtentReport.test.Log(LogStatus.Info, "<b>" + cName + "</b> - Down button clicked and moved the Competency Level down by one row in the Competencies Levels Grid"); CompetencyLevelActionUpButton.Click(); Thread.Sleep(4000); ExtentReport.test.Log(LogStatus.Info, "<b>" + cName + "</b> - Up button clicked and moved the Competency Level up by one row in the Competencies Levels Grid"); CompetencyLevelActionEditButton.Click(); Thread.Sleep(6000); Assert.IsTrue(CompetencyLevelEdit_Popup.Displayed, "Edit button click is not opening the Competency Level Edit popup properly in the Competencies Levels Grid"); ExtentReport.test.Log(LogStatus.Pass, "Edit button click is opening the Competency Level Edit popup properly in the Competencies Levels Grid"); CloseButton_Popup.Click(); Thread.Sleep(3000); } }