Example #1
0
        public void TC06_CreateReportForDashboard_UsingChartWidget()
        {
            HomeObject      homeObj             = new HomeObject(driver);
            HomeAction      homePageAct         = new HomeAction(driver);
            DashboardAction dashboardAct        = new DashboardAction(driver);
            ReportingAction reportAct           = new ReportingAction(driver);
            Random          random              = new Random();
            string          dashboardReportName = "Test_DashboardChartName_" + random.Next(0, 400);

            try
            {
                Console.WriteLine("Test Started");

                WaitForMoment(4);
                homePageAct.ClickOnDashboardLink();
                WaitForMoment(4);
                dashboardAct.ClickOnCreate();
                WaitForMoment(4);
                dashboardAct.SelectChart(driver);
                WaitForMoment(4);
                dashboardAct.ClickOnAddTimeFilterButton();
                WaitForMoment(4);
                reportAct.ExpandALL();
                WaitForMoment(4);
                dashboardAct.ClickOnAlaramItem();
                WaitForMoment(4);
                dashboardAct.ClickOnTotalAlaramCountButton();
                WaitForMoment(4);
                dashboardAct.ClickOnSaveTimeFilterButton();
                WaitForMoment(4);
                reportAct.ClickOnSaveReportButton();
                WaitForMoment(4);
                //dashboardAct.HandleException();
                WaitForMoment(4);
                dashboardAct.ClickOnSaveOneReportButton();
                WaitForMoment(4);
                dashboardAct.EnterDashboardReportName(dashboardReportName);
                WaitForMoment(4);
                dashboardAct.ClickOnAddTimeFilterButton();
                WaitForMoment(4);
                dashboardAct.EnterTimefilterName("Timefilter_Name_" + random.Next(400, 800));
                WaitForMoment(4);
                dashboardAct.ClickOnSaveTimeFilterButton();
                WaitForMoment(4);
                reportAct.ClickOnSaveReportButton();
                WaitForMoment(4);
                dashboardAct.SelectTheDashboardReport(driver, dashboardReportName);
                WaitForMoment(4);
                dashboardAct.ClickOnDeleteButton();
                WaitForMoment(4);
                reportAct.ClickOnYesButton();
                WaitForMoment(10);

                Console.WriteLine("Test Finished");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Example #2
0
        public void TC06_CreateReportForDashboard_UsingReportWidget()
        {
            HomeObject      homeObj             = new HomeObject(driver);
            HomeAction      homePageAct         = new HomeAction(driver);
            DashboardAction dashboardAct        = new DashboardAction(driver);
            ReportingAction reportAct           = new ReportingAction(driver);
            Random          random              = new Random();
            string          dashboardReportName = "Test_DashboardChartName_" + random.Next(0, 400);

            try
            {
                Console.WriteLine("Test Started");

                WaitForMoment(4);
                homePageAct.ClickOnDashboardLink();
                WaitForMoment(4);
                dashboardAct.ClickOnCreate();
                WaitForMoment(4);
                dashboardAct.SelectReport(driver);
                WaitForMoment(4);
                dashboardAct.EnterTitle("DashBoardTesting_" + random.Next(800, 1000));
                WaitForMoment(4);
                reportAct.ExpandALL();
                reportAct.ClickOnDurationUntilAcknowledgementReport();
                WaitForMoment(4);
                dashboardAct.ClickOnSetReportParamaeterButton();
                WaitForMoment(4);
                reportAct.EnterStartDateTime("11/19/2017 4:37:10 PM");
                WaitForMoment(4);
                reportAct.ClickOnShowPreviewButton();
                WaitForMoment(15);
                dashboardAct.ClickOnSaveReportButton();
                WaitForMoment(4);
                reportAct.ClickOnSaveReportButton();
                WaitForMoment(20);
                dashboardAct.ClickOnSaveOneReportButton();
                WaitForMoment(4);
                dashboardAct.EnterDashboardReportName(dashboardReportName);
                WaitForMoment(4);
                dashboardAct.ClickOnAddTimeFilterButton();
                WaitForMoment(4);
                dashboardAct.EnterTimefilterName("Timefilter_Name_" + random.Next(400, 800));
                WaitForMoment(4);
                dashboardAct.ClickOnSaveTimeFilterButton();
                WaitForMoment(4);
                reportAct.ClickOnSaveReportButton();
                WaitForMoment(4);
                dashboardAct.SelectTheDashboardReport(driver, dashboardReportName);
                WaitForMoment(4);
                dashboardAct.ClickOnDeleteButton();
                WaitForMoment(4);
                reportAct.ClickOnYesButton();
                WaitForMoment(10);

                Console.WriteLine("Test Finished");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }