public void AddPlanningBoard() { PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_AddPlanningBoard"); FpDefinePlanningBoardsPage planningBoardsPage = new FpDefinePlanningBoardsPage(); strTestCaseNo = "TC001_Reg"; strtblname = "automation_defineplanningboard"; strTestType = "Regression"; var connection = new ConnectToMySQL_Fetch_TestData(); var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType); strTDPlanningBoardName = testdataDefinePlanningBoard[3]; strTDOrganisationGroup = testdataDefinePlanningBoard[5]; strTDSelectOrgGroup = testdataDefinePlanningBoard[6]; planningBoardsPage.AddPlanningBoard(strTDPlanningBoardName, strTDOrganisationGroup, strTDSelectOrgGroup); Thread.Sleep(5000); String[] strFPwebPlanningBoardName = planningBoardsPage.RetrievePlanningBoarddetails(strTDPlanningBoardName); try { Assert.AreEqual(strTDPlanningBoardName, strFPwebPlanningBoardName[0]); PropertiesCollection.test.Log(Status.Pass, "ADD PLANNING BOARD => Planning Board: " + strFPwebPlanningBoardName[0] + " created and validated"); } catch { PropertiesCollection.test.Log(Status.Fail, "ADD PLANNING BOARD => Planning Board creation has failed"); } }
public void DeletePlanningBoard() { PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC05_DeletePlanningBoard"); FpDefinePlanningBoardsPage planningBoardsPage = new FpDefinePlanningBoardsPage(); strTestCaseNo = "TC005_Reg"; strtblname = "automation_defineplanningboard"; strTestType = "Regression"; var connection = new ConnectToMySQL_Fetch_TestData(); var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType); strTDPlanningBoardName = testdataDefinePlanningBoard[3]; strTDOrganisationGroup = testdataDefinePlanningBoard[5]; PropertiesCollection.driver.Navigate().Refresh(); planningBoardsPage.DeletePlanningBoard(strTDPlanningBoardName, strTDOrganisationGroup); Thread.Sleep(3000); string[] strFPwebPlanningBoardName = planningBoardsPage.RetrievePlanningBoarddetails(strTDPlanningBoardName); try { Assert.AreNotEqual(strTDPlanningBoardName, strFPwebPlanningBoardName); PropertiesCollection.test.Log(Status.Pass, "DELETE PLANNING BOARD => Planning Board: " + strTDPlanningBoardName + " has been deleted"); } catch { PropertiesCollection.test.Log(Status.Fail, "DELETE PLANNING BOARD => Planning Board deletion has failed"); } }
public void TS05_PlanningBoard_TC02_AddPlanningBoard() { PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC02_AddPlanningBoard"); String strTestCaseNo = "TC001"; String strtblname = "automation_defineplanningboard"; String strTestType = "Smoke"; /* Get test data from MySQL */ var connection = new ConnectToMySQL_Fetch_TestData(); var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType); string strTDPlanningBoardName = testdataDefinePlanningBoard[3]; string strTDOrganisationGroup = testdataDefinePlanningBoard[5]; string strTDSelectOrgGroup = testdataDefinePlanningBoard[6]; FpDefinePlanningBoardsPage PlanningBoard = new FpDefinePlanningBoardsPage(); PlanningBoard.AddPlanningBoard(strTDPlanningBoardName, strTDOrganisationGroup, strTDSelectOrgGroup); String[] strFPwebPlanningBoardName = PlanningBoard.RetrievePlanningBoarddetails(strTDPlanningBoardName); try { Assert.AreEqual(strTDPlanningBoardName, strFPwebPlanningBoardName[0]); PropertiesCollection.test.Log(Status.Pass, "Planning Board: " + strFPwebPlanningBoardName[0] + " created and validated"); } catch { PropertiesCollection.test.Log(Status.Fail, "Planning Board Name is not matching"); throw; } }
public void TS05_PlanningBoard_TC07_DeletePlanningBoard() { PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC07_DeletePlanningBoard"); FpAdminMenus AdminMenu = new FpAdminMenus(); AdminMenu.AdminClick(); AdminMenu.DefinePlanningBoardsClick(); System.Threading.Thread.Sleep(30000); FpDefinePlanningBoardsPage PlanningBoard = new FpDefinePlanningBoardsPage(); PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.frame); String strTestCaseNo = "TC001"; String strtblname = "automation_defineplanningboard"; String strTestType = "Smoke"; /* Get test data from MySQL */ var connection = new ConnectToMySQL_Fetch_TestData(); var testdataDefinePlanningBoard = connection.Select(strtblname, strTestCaseNo, strTestType); string strTDPlanningBoardName = testdataDefinePlanningBoard[3]; string strTDOrganisationGroup = testdataDefinePlanningBoard[5]; PlanningBoard.DeletePlanningBoard(strTDPlanningBoardName, strTDOrganisationGroup); String[] PlanningBoarddetails = PlanningBoard.RetrievePlanningBoarddetails(strTDPlanningBoardName); String strFPwebPlanningBoardName = PlanningBoarddetails[1]; try { Assert.IsNull(strFPwebPlanningBoardName); PropertiesCollection.test.Log(Status.Pass, "Planning Board is deleted on Define Planning Board Admin screen"); } catch { PropertiesCollection.test.Log(Status.Fail, "Planning Board not deleted"); throw; } }