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_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; } }