Esempio n. 1
0
            public void TS05_PlanningBoard_TC06_DeleteActivity()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC06_DeleteActivity");

                String strTestCaseNo = "TC001";
                String strtblname = "automation_planningboard";
                String strTestType = "Smoke";

                string strTDActivityCode = String.Empty;
                string strTDActivityName = String.Empty;
                string strTDOrganisationGroupName = String.Empty;

                /* Get test data from MySQL */

                var connection = new ConnectToMySQL_Fetch_TestData();
                var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType);

                strTDOrganisationGroupName = testdataDefinePlanningBoard[8];

                FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();
                PlanningBoard.DeleteActivity(strTDOrganisationGroupName);
                
                try
                {

                    Assert.IsFalse(PlanningBoard.ActivitySelected.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Activity deleted successfully on Planning Board");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Activity not deleted on Planning Board");
                    throw;
                }
            }
Esempio n. 2
0
            public void TS05_PlanningBoard_TC05_CreateTask_PushToPane()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC05_CreateTask_PushToPane");

                String strTestCaseNo = "TC001";
                String strtblname = "automation_planningboard";
                String strTestType = "Smoke";

                
                /* Get test data from MySQL */

                var connection = new ConnectToMySQL_Fetch_TestData();
                var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType);

                string strTDOrganisationGroupName = testdataDefinePlanningBoard[5];
                string strTDTaskCode = testdataDefinePlanningBoard[6];
                string strTDAssetCode = testdataDefinePlanningBoard[7];
                string strTDShiftCode = testdataDefinePlanningBoard[8];
               
                

                FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();
                PlanningBoard.CreateTask(strTDTaskCode, strTDAssetCode, strTDShiftCode);
                             

                try
                {
                    Assert.IsTrue(PlanningBoard.TaskPackageSelection.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Task Package Created Successfully");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Task Package not created");
                    throw;
                }

                PlanningBoard.PushTaskToPane(strTDTaskCode, strTDOrganisationGroupName);
                System.Threading.Thread.Sleep(60000);
              
                try
                {
                    Assert.IsTrue(PlanningBoard.PushtoPaneTitle.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Task Package pushed to Pane Successfully");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Task Package not pushed to Pane");
                    throw;
                }
                PlanningBoard.BtnOK.Click();
                System.Threading.Thread.Sleep(15000);
                PlanningBoard.BtnCancel.Click();
                System.Threading.Thread.Sleep(15000);
            }
            public void TS01_TC04_ValidatePlanningBoardSideMenu()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC04_ValidatePlanningBoardSideMenu");

                /* Validate Planning Board Page */

                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.PlanningBoardClick();
                System.Threading.Thread.Sleep(60000);
                FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();

                PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.Frame);

                try
                {
                    //      Assert.IsTrue(PlanningBoard.CboPlanningBoardName.Displayed);
                    //      PropertiesCollection.test.Log(Status.Pass, " Planning Board Page loaded");
                }
                catch
                {
                    //    PropertiesCollection.test.Log(Status.Fail, " Planning Board Page not loaded");
                }
            }
Esempio n. 4
0
            public void TS05_PlanningBoard_TC04_CreateActivity()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC04_CreateActivity");

                String strTestCaseNo = "TC001";
                String strtblname = "automation_planningboard";
                String strTestType = "Smoke";

                /* Get test data from MySQL */

                var connection = new ConnectToMySQL_Fetch_TestData();
                var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType);

                string strTDActivityCode = testdataDefinePlanningBoard[3];
                string strTDActivityName = testdataDefinePlanningBoard[4];
                string strTDOrganisationGroupName = testdataDefinePlanningBoard[5];
                               
                FpSideMenus SideMenu = new FpSideMenus();
                System.Threading.Thread.Sleep(30000);
                SideMenu.PlanningBoardClick();
                System.Threading.Thread.Sleep(60000);
                FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();
                PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.Frame);
                PlanningBoard.TabActivityView.Click();
                System.Threading.Thread.Sleep(5000);
                PlanningBoard.TabDaily.Click();
                System.Threading.Thread.Sleep(5000);
               /* PlanningBoard.CboPlanningBoardName.Click();
                System.Threading.Thread.Sleep(15000);
                PlanningBoard.CboPlanningBoardName.SendKeys(strTDOrganisationGroupName);
                PlanningBoard.PlanningBoardSelection.Click();
*/
                try
                {
                    if (PlanningBoard.BtnClickHere.Displayed == true)
                    {                        
                        PlanningBoard.BtnClickHere.Click();
                        PlanningBoard.CreateActivity(strTDActivityCode, strTDActivityName, strTDOrganisationGroupName, "Test");
                    }
                    else if (PlanningBoard.BtnClickHere.Displayed != true)
                    {
                        Actions action = new Actions(PropertiesCollection.driver);
                        action.MoveToElement(PlanningBoard.GridRowSelection).DoubleClick().Perform();
                        System.Threading.Thread.Sleep(5000);
                        PlanningBoard.CreateActivity(strTDActivityCode, strTDActivityName, strTDOrganisationGroupName, "Automation Planning Board");
                    }                    
                }
                finally
                {
                    try
                    {
                        Assert.IsTrue(PlanningBoard.Activity.Displayed);
                        PropertiesCollection.test.Log(Status.Pass, "Activity Created Successfully");
                    }
                    catch
                    {
                        PropertiesCollection.test.Log(Status.Fail, "Activity not created");
                        throw;
                    }
                }
                
            }