Пример #1
0
        public static void DismissPopupMultipleTemplate()
        {
            log4net.Config.XmlConfigurator.Configure();
            ILog logger = LogManager.GetLogger(typeof(MyProjectsPage));

            test = Base.extent.CreateTest("DismissPopup");
            try
            {
                FirstCheckBox.Click();
                FirstCheckBox.Click();
                SecondCheckBox.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("Click on Cancel button failed due to : " + e);
                //**Closing browser
                Driver.Quit();
                throw e;
            }
        }
Пример #2
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;
            }
        }