public void TS04_TC01_Smoke_CreateCombinedScheduleReport() { String strTestCaseNo = "TC001"; String strtblname = "automation_combinedschedule"; String strTestType = "Smoke"; PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_Smoke_CreateCombinedScheduleReport"); /* Get test data from MySQL */ var connection = new ConnectToMySQL_Fetch_TestData(); var testdataCombinedSchedule = connection.Select(strtblname, strTestCaseNo, strTestType); string strTDReportName = testdataCombinedSchedule[3]; string strTDOrganisationGroup = testdataCombinedSchedule[4]; string strTDClassification = testdataCombinedSchedule[5]; string strTDPane = testdataCombinedSchedule[6]; string strTDNote = testdataCombinedSchedule[7]; string strTDDate = testdataCombinedSchedule[8]; /* Delete Combined Schedule Report if existing already */ string strSQLtblname = "tblCombinedScheduleReport"; string strtblcolumn = "Name"; string strwherecondn = strTDReportName; ////var conn = new ConnectToSQLServer(); //bool result = conn.Delete(strSQLtblname, strtblcolumn, strwherecondn); /* Create Combined Schedule Report*/ FpCombinedSchedulePage CombinedSchedule = new FpCombinedSchedulePage(); String ReportTitle = CombinedSchedule.CreateCombinedScheduleReport(strTDReportName, strTDOrganisationGroup, strTDClassification, strTDPane, strTDNote); Console.WriteLine(ReportTitle); /* Verify Report Name */ try { Assert.AreEqual(ReportTitle, strTDReportName); PropertiesCollection.test.Log(Status.Pass, "Combined Schedule Report created successfully"); } catch { PropertiesCollection.test.Log(Status.Fail, "Combined Schedule Report not Created"); throw; } CombinedSchedule.btnDay.Click(); System.Threading.Thread.Sleep(5000); int height = CombinedSchedule.date.Size.Height; int width = CombinedSchedule.date.Size.Width; Console.WriteLine(height); Console.WriteLine(width); Actions actions = new Actions(PropertiesCollection.driver); actions.MoveToElement(CombinedSchedule.date).MoveByOffset((-width / 3), 2).Click().Perform(); System.Threading.Thread.Sleep(3000); CombinedSchedule.date.SendKeys(strTDDate + Keys.Tab); System.Threading.Thread.Sleep(15000); CombinedSchedule.btnRefresh.Click(); System.Threading.Thread.Sleep(15000); /* Verify Mission Strip */ try { Assert.IsTrue(CombinedSchedule.missionStrip.Displayed); PropertiesCollection.test.Log(Status.Pass, "Mission Strip is displayed"); } catch { PropertiesCollection.test.Log(Status.Fail, "Mission Strip is not displayed"); throw; } /* Verify Formation Group Strip */ try { Assert.IsTrue(CombinedSchedule.formationStrip.Displayed); PropertiesCollection.test.Log(Status.Pass, "Formation Group Strip is displayed"); } catch { PropertiesCollection.test.Log(Status.Fail, "Formation Group Strip is not displayed"); throw; } /* Verify Sortie Group Strips */ try { Assert.IsTrue(CombinedSchedule.sortieStrip1.Displayed); PropertiesCollection.test.Log(Status.Pass, "Sortie Group Strip 1 is displayed"); } catch { PropertiesCollection.test.Log(Status.Fail, "Sortie Group Strip 1 is not displayed"); throw; } try { Assert.IsTrue(CombinedSchedule.sortieStrip2.Displayed); PropertiesCollection.test.Log(Status.Pass, "Sortie Group Strip 2 is displayed"); } catch { PropertiesCollection.test.Log(Status.Fail, "Sortie Group Strip 2 is not displayed"); throw; } try { Assert.IsTrue(CombinedSchedule.sortieStrip3.Displayed); PropertiesCollection.test.Log(Status.Pass, "Sortie Group Strip 3 is displayed"); } catch { PropertiesCollection.test.Log(Status.Fail, "Sortie Group Strip 3 is not displayed"); throw; } /* Delete Combined Schedule Report */ //result = conn.Delete(strSQLtblname, strtblcolumn, strwherecondn); // try // { // Assert.AreEqual(result, true); // PropertiesCollection.test.Log(Status.Pass, "Combined Schedule Report deleted"); // } // catch // { // PropertiesCollection.test.Log(Status.Fail, "Combined Schedule Report not deleted"); // throw; // } }