public static void DeleteEntity() { GridHelper.ActiveTab = 1; GridHelper.GoToActiveTab(); GridHelper.GridId = "entitiesGrid"; GridHelper.RowId = "test"; GridHelper.BtnClick("Delete"); GridHelper.ConfrimButtonClick(true); Thread.Sleep(500); if (GridHelper.IsRowExists()) { Assert.Fail("DeleteRow Fail"); } }
public static void DeleteTemplet() { WaitHelper.Wait.Until(ExpectedConditions.ElementToBeClickable(By.ClassName("xms-reports-filter-period-type"))); var container = SeleniumDriver.driver.FindElements(By.ClassName("cards-container")); var buttonadmin = container[0].FindElements(By.ClassName("card-button-admin")); buttonadmin[0].Click(); WaitHelper.Wait.Until(ExpectedConditions.ElementIsVisible(By.Id("report-admin-modal"))); AdminPageHelper.SwitchToIframeInContainerId("report-admin-modal"); GridHelper.GridId = "templatesGrid"; GridHelper.RowId = "test"; var row = GridHelper.GetRow(); GridHelper.BtnClick("Delete"); GridHelper.ConfrimButtonClick(true); var dialog = WaitHelper.WaitToConfrimWindow(); var btnOk = dialog.FindElement(By.XPath("//button[contains(text(),'אישור')]")); btnOk.Click(); AdminPageHelper.SwitchToMainPage(); SeleniumDriver.driver.Navigate().Refresh(); WaitHelper.Wait.Until(ExpectedConditions.ElementToBeClickable(By.ClassName("xms-reports-filter-period-type"))); container = SeleniumDriver.driver.FindElements(By.ClassName("cards-container")); buttonadmin = container[0].FindElements(By.ClassName("card-button-admin")); buttonadmin[0].Click(); WaitHelper.Wait.Until(ExpectedConditions.ElementIsVisible(By.Id("report-admin-modal"))); AdminPageHelper.SwitchToIframeInContainerId("report-admin-modal"); row = GridHelper.GetRow(); if (row != null) { Assert.Fail("Fail to delete templet"); } AdminPageHelper.SwitchToMainPage(); SeleniumDriver.driver.Navigate().Refresh(); }