public void EditTest() { HomeTestPage home = new HomeTestPage(driver); home.HomeTestCases1(); // edit test cases EditTestPage edit = new EditTestPage(driver); Validations val = new Validations(driver); string code = ExcelUtility.ReadData(2, "Validate"); //aisha shaik-validate bool isFound = val.ValidateTimeMaterial(code, true, false); if (isFound) { edit.EditTimeAndMaterials(); bool isEdited = val.ValidateTimeMaterial(ExcelUtility.ReadData(2, "editValidate"), false, false); //112233 = edit validate Assert.AreEqual(true, isEdited); Assert.Pass("Successfully edited the row."); } else { Assert.Fail($"Code {code} not found."); } }
public void ThenTheValuesShouldBeEdited_() { // edit test cases EditTestPage edit = new EditTestPage(driver); Validations val = new Validations(driver); string code = ExcelUtility.ReadData(2, "Validate"); //aisha shaik-validate bool isFound = val.ValidateTimeMaterial(code, true, false); if (isFound) { edit.EditTimeAndMaterials(); bool isEdited = val.ValidateTimeMaterial(ExcelUtility.ReadData(2, "editValidate"), false, false); //112233 = edit validate Assert.AreEqual(true, isEdited); Assert.Pass("Successfully edited the row."); } else { Assert.Fail($"Code {code} not found."); } IWebElement editSave = driver.FindElement(By.XPath("//input[contains(@id,'SaveButton')]")); editSave.Click(); driver.Quit(); }