Exemple #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;
            }
        }
Exemple #2
0
        public static void VerifyProjectsPage()
        {
            log4net.Config.XmlConfigurator.Configure();
            ILog logger = LogManager.GetLogger(typeof(MyProjectsPage));

            try
            {
                //Check the visiblity of My Project Header
                Wait.WaitVisible(ProjectsHeader, 60);
                bool status_of_myprojectheader = ProjectsHeader.IsElementDisplayed();
                Console.WriteLine("Status of logo is " + status_of_myprojectheader);

                //Check the status of SelectAll
                Wait.WaitVisible(SelectAll, 60);
                bool status_of_selecteall = ProjectsHeader.IsElementEnabled();
                Console.WriteLine("Status of SelectAll is " + status_of_selecteall);

                //Check the status of SelectNone
                Wait.WaitVisible(SelectNone, 60);
                bool status_of_selectnone = ProjectsHeader.IsElementEnabled();
                Console.WriteLine("Status of SelectNone is " + status_of_selectnone);

                //Check the status of DeleteSelected
                Wait.WaitVisible(DeleteSelected, 60);
                bool status_of_deleteselected = DeleteSelected.IsElementEnabled();
                Console.WriteLine("Status of DeleteSelected is " + status_of_deleteselected);
            }
            catch (Exception e)
            {
                logger.Error("Verify home page failed due to : " + e);
                //**Closing browser
                Driver.Quit();
                throw e;
            }
        }