//Delete All Templates public static void DeleteAllTemplates() { log4net.Config.XmlConfigurator.Configure(); ILog logger = LogManager.GetLogger(typeof(MyProjectsPage)); try { SelectAllCheckBox.Click(); DeleteSelected.Click(); bool status_of_deletealertpopup = DeleteAlertPopup.IsElementDisplayed(); Assert.IsTrue(status_of_deletealertpopup); Wait.WaitVisible(ConfirmationMsgPopup, 10); Console.WriteLine("Confirmation message is " + ConfirmationMsgPopup.GetText()); } catch (Exception e) { logger.Error("Delete All Template failed due to : " + e); //**Closing browser Driver.Quit(); throw e; } }
public static void DismissPopupAllTemplate() { log4net.Config.XmlConfigurator.Configure(); ILog logger = LogManager.GetLogger(typeof(MyProjectsPage)); test = Base.extent.CreateTest("DismissPopupAllTemplate"); try { SelectAllCheckBox.Click(); DeleteSelected.Click(); Wait.WaitVisible(DeleteAlertPopup, 10); Console.Write("Message from the Delete alert popup is " + DeleteAlertPopupMsg.GetText()); DeleteAlertPopupNo.Click(); Assert.IsTrue(ProjectsHeader.IsElementDisplayed()); } catch (Exception e) { logger.Error("Dismiss PopupAll Template failed due to : " + e); //**Closing browser Driver.Quit(); throw e; } }