Esempio n. 1
0
        //Delete Multiple Templates
        public static void DeleteMultipleTemplates()
        {
            log4net.Config.XmlConfigurator.Configure();
            ILog logger = LogManager.GetLogger(typeof(MyProjectsPage));

            try
            {
                FirstCheckBox.Click();
                SecondCheckBox.Click();
                DeleteSelected.Click();
                Wait.WaitVisible(DeleteAlertPopup, 10);
                if (DeleteAlertPopup.IsElementDisplayed())
                {
                    Console.Write("Message from the Delete alert popup is " + DeleteAlertPopupMsg.GetText());
                    DeleteAlertPopupYes.Click();
                }
                else
                {
                    Console.Write("Delete alert pop-up is not comming ");
                }
                Console.WriteLine("Confirmation message is " + ConfirmationMsgPopup.GetText());
                Wait.WaitTime(10);
            }
            catch (Exception e)
            {
                logger.Error("Delete Multiple Template failed due to : " + e);
                //**Closing browser
                Driver.Quit();
                throw e;
            }
        }
Esempio n. 2
0
        //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;
            }
        }