Exemple #1
0
            public void US_41948_Workflows_ViewHeader()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_41948_Workflows_ViewHeader");
                FpSideMenus sidebarMenu = new FpSideMenus();

                sidebarMenu.LnkSummary.Click();
                FpSummaryPage summary = new FpSummaryPage();

                System.Threading.Thread.Sleep(4000);
                Console.WriteLine("Count" + summary.RetriveWorkflowCount());
                var noofWorkflows = summary.RetriveWorkflowCount();

                Console.WriteLine();

                for (int i = 0; i < summary.grdWorkflow.Count; i++)
                {
                    System.Threading.Thread.Sleep(2000);
                    summary.grdWorkflow.ElementAt(i).Click();
                    System.Threading.Thread.Sleep(2000);

                    System.Threading.Thread.Sleep(2000);
                    // Assert.AreEqual(summary.grdWorkflowTypes.ElementAt(i).Text,summary.txtboxWorkFlowType.GetAttribute("value"));

                    Console.WriteLine("WorkFlowLinkedTo:", summary.grdLinkedTo.ElementAt(i).Text);
                    // Assert.AreEqual(summary.grdLinkedTo.ElementAt(i).Text,summary.txtboxWorkFlowLinkedTo.GetAttribute("value"));

                    Console.WriteLine("WorkFlowTitleDescription:", summary.grdTitleDescription.ElementAt(i).Text);
                    // Assert.AreEqual(summary.grdTitleDescription.ElementAt(i).Text,summary.txtboxWorkFlowTitle.GetAttribute("value"));

                    Console.WriteLine("WorkFlowNotes:", summary.grdNotes.ElementAt(i).Text);
                    // Assert.AreEqual(summary.grdTitleDescription.ElementAt(i).Text,summary.txtboxWorkFlowNotes.GetAttribute("value"));

                    Console.WriteLine("WorkFlowDueDate:", summary.grdDue.ElementAt(i).Text);
                }
            }
Exemple #2
0
        public void US_41937_Security_JOT_token_expiry()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_41937_Security: JOT token expiry");
            var sidebarMenu = new FpSideMenus();
            FpCombinedSchedulePage combinedSchedule = new FpCombinedSchedulePage();

            sidebarMenu.LnkCombinedSchedule.Click();
            IWebElement framesource = PropertiesCollection.driver.FindElement(By.XPath("//iframe[@class='iframe-placeholder']"));

            var frameSourceValue = framesource.GetAttribute("src");

            PropertiesCollection.driver.Close();
            PropertiesCollection.driver.Quit();
            System.Threading.Thread.Sleep(20000);

            PropertiesCollection.driver = new ChromeDriver(@ConfigurationManager.AppSettings["ChromeDriverPath"]);
            PropertiesCollection.driver.Navigate().GoToUrl(frameSourceValue);
            PropertiesCollection.driver.Manage().Window.Maximize();

            IWebElement errorCode = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"error-information-popup-content\"]/div[2]"));

            try
            {
                Assert.AreEqual("HTTP ERROR 401", errorCode.Text);
                PropertiesCollection.test.Log(Status.Pass, "The web page is not accessible");
            }
            catch
            {
                PropertiesCollection.test.Log(Status.Fail, "The web page is accessible ");
            }
        }
Exemple #3
0
        public void US_42555_PreventCrossSiteScripts_Calendar()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_42555_PreventCrossSiteScripts_Calendar");
            FpSideMenus SideMenu = new FpSideMenus();

            SideMenu.CalendarClick();
            System.Threading.Thread.Sleep(2000);
            FpCalendarPage CalendarPage = new FpCalendarPage();

            CalendarPage.BtnToday.Click();
            System.Threading.Thread.Sleep(2000);
            Actions actions = new Actions(PropertiesCollection.driver);

            actions.MoveToElement(CalendarPage.Grid).Perform();
            actions.DoubleClick(CalendarPage.Grid).Perform();
            System.Threading.Thread.Sleep(2000);

            foreach (var script in crossSiteScripts)
            {
                CalendarPage.TxtDescription.SendKeys(script);
                CalendarPage.BtnSave.Click();
                System.Threading.Thread.Sleep(1000);

                try
                {
                    Assert.IsTrue(CalendarPage.lblPeopleUnavailability.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "CrossSiteScript: \n \'" + script.Length + "\'\n was prevented");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "CrossSiteScript: \n \'" + script.Length + "\'\n was not prevented");
                }
                CalendarPage.TxtDescription.Clear();
            }
        }
Exemple #4
0
        public void US_42183_PreventCrossSiteScripts_KnowledgeBase()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_42183_PreventCrossSiteScripts_KnowledgeBase");
            FpSideMenus SideMenu = new FpSideMenus();

            System.Threading.Thread.Sleep(5000);
            SideMenu.LnkKnowledgeBase.Click();
            System.Threading.Thread.Sleep(8000);
            FpKnowledgeBasePage KnowledgeBasePage = new FpKnowledgeBasePage();

            foreach (var script in crossSiteScripts)
            {
                KnowledgeBasePage.btnAddKnowledgebaseByEntry.Click();
                KnowledgeBasePage.txtboxKnowledgeBaseTitle.SendKeys(script);
                PropertiesCollection.driver.SwitchTo().Frame(KnowledgeBasePage.iFrame);
                KnowledgeBasePage.txtAreaFrameKnowledgeBase.SendKeys(script);
                System.Threading.Thread.Sleep(2000);
                PropertiesCollection.driver.SwitchTo().DefaultContent();
                KnowledgeBasePage.btnSave.Click();
                Assert.IsTrue(KnowledgeBasePage.btnSave.Displayed);
                KnowledgeBasePage.txtboxKnowledgeBaseTitle.Clear();
                KnowledgeBasePage.txtboxKnowledgeBaseTitle.SendKeys("Modified Title");
                KnowledgeBasePage.btnSave.Click();
                System.Threading.Thread.Sleep(2000);
                Assert.AreEqual(KnowledgeBasePage.countbtnSave, 0);
                System.Threading.Thread.Sleep(2000);
                Assert.AreEqual(KnowledgeBasePage.lbliFrameKnowledgeBase.Text, script);
                KnowledgeBasePage.btnDelete.Click();
                KnowledgeBasePage.btnOK.Click();
                System.Threading.Thread.Sleep(2000);
            }
        }
            public void TC05_NavigateToDifferentWindowWithoutSave()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC05_NavigateToDifferentWindowWithoutSave");
                FpAssetTypeSettingsPage assetTypeSettings = new FpAssetTypeSettingsPage();
                FpSideMenus             sideMenus         = new FpSideMenus();

                assetTypeSettings.NavigateToAssetTypeSettings();

                assetTypeSettings.btnEditAssetTypeSettings.Click();

                Thread.Sleep(3000);

                assetTypeSettings.txtAvailableStations.Clear();
                assetTypeSettings.txtAvailableStations.SendKeys("3");
                assetTypeSettings.btnSave.Click();

                Thread.Sleep(5000);

                assetTypeSettings.btnEditAssetTypeSettings.Click();

                Thread.Sleep(3000);

                assetTypeSettings.txtAvailableStations.Clear();

                assetTypeSettings.txtAvailableStations.SendKeys("4");

                String mainWindow = PropertiesCollection.driver.CurrentWindowHandle;

                sideMenus.lnkStudentResults.Click();

                String childWindow = PropertiesCollection.driver.CurrentWindowHandle;

                PropertiesCollection.driver.SwitchTo().Window(childWindow);

                Thread.Sleep(5000);

                String errorText = assetTypeSettings.txtConfirmationMessage.Text;

                try
                {
                    String ExpectedErrorMessage = "Any unsaved changes will be lost. Are you sure?";
                    Assert.AreEqual(ExpectedErrorMessage, errorText);
                    PropertiesCollection.test.Log(Status.Pass, "Validation for message received when navigating to a different window without save has passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Validation for message received when navigating to a different window without save has not passed");
                }
                assetTypeSettings.btnCancel.Click();

                PropertiesCollection.driver.SwitchTo().Window(mainWindow);

                assetTypeSettings.btnSave.Click();
            }
Exemple #6
0
            public void TS03_TC04_Roster_RemoveRoster()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS03_TC04_Roster_RemoveRoster");
                String strtblname  = "automation_shiftadministration";
                String strtblname1 = "automation_rosteradministration";
                String OrgRoster   = "FighterSQN - Test Automation";
                Int64  RosterID    = 0;


                var connection              = new ConnectToMySQL_Fetch_TestData();
                var SidebarMenu             = new FpSideMenus();
                var PersonnelScheduleRoster = new clsPersonnelSchedulingRoster();

                var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType);

                String strTDShiftName  = testdataShift[4];
                String strTDShortCode  = testdataShift[5];
                String strTDStartTime  = testdataShift[6];
                String strTDDuration   = testdataShift[7];
                String strTDCurrencies = testdataShift[8];
                String strTDStatus     = testdataShift[9];

                var testdataRoster = connection.Select(strtblname1, strTestCaseNo, strTestType);

                string strTDRosterName = testdataRoster[4];

                System.Threading.Thread.Sleep(1000);
                SidebarMenu.LnkRoster.Click();

                System.Threading.Thread.Sleep(4000);

                string        strConnectionString = "Data Source=" + ConfigurationManager.AppSettings["SQLServerDataSource"] + ";Initial Catalog=" + ConfigurationManager.AppSettings["SQLServerInitialCatalog"] + ";User Id=" + ConfigurationManager.AppSettings["SQLServerUserId"] + ";Password="******"SQLServerPassword"];
                SqlConnection myConnection        = new SqlConnection(strConnectionString);

                myConnection.Open();
                SqlDataReader reader   = null;
                String        strQuery = "select RosterID from tblRoster where RosterName = '" + strTDRosterName + "';";
                SqlCommand    command  = new SqlCommand(strQuery, myConnection);

                reader = command.ExecuteReader();
                while (reader.Read())
                {
                    RosterID = Convert.ToInt64(reader.GetValue(0));
                    Console.WriteLine("RosterID" + RosterID);
                }
                reader.Close();

                string     strQuery1 = "delete from tblRosterPerson where RosterID = '" + RosterID + "';";
                SqlCommand command1  = new SqlCommand(strQuery1, myConnection);

                command1.ExecuteNonQuery();
                myConnection.Close();
                System.Threading.Thread.Sleep(4000);
            }
            public void TS02_TC02_StudentResults_ClearEvent()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS02_TC02_StudentResults_ClearEvent");

                var connection             = new ConnectToMySQL_Fetch_TestData();
                var testdataStudentResults = connection.Select(strtblname, strTestCaseNo, strTestType);
                var SidebarMenu            = new FpSideMenus();
                var StudentResults         = new FpStudentResultsPage();

                SidebarMenu.lnkStudentResults.Click();

                String strTDOrgnisationGroup       = testdataStudentResults[4];
                String strTDStudentName            = testdataStudentResults[5];
                String strTDInstructorName         = testdataStudentResults[6];
                String strTDCourseName             = testdataStudentResults[7];
                String strTDSyllabusName           = testdataStudentResults[8];
                String strTDEventName              = testdataStudentResults[9];
                String strTDScore                  = testdataStudentResults[10];
                String strTDScoreAssesmentCriteria = testdataStudentResults[11];
                String strTDStrength               = testdataStudentResults[12];
                String strTDWeakness               = testdataStudentResults[13];
                String strTDOverallComments        = testdataStudentResults[14];
                String strTDPrivateComments        = testdataStudentResults[15];
                String strTDServiceName            = testdataStudentResults[16];
                String strTDCountryName            = testdataStudentResults[17];
                String strTDStudentPosition        = testdataStudentResults[18];
                String strTDStudentSurname         = testdataStudentResults[19];

                StudentResults.SearchStudent(strTDStudentSurname);

                StudentResults.SearchCourseEvent((strTDEventName));

                StudentResults.VerifyEventIcon(strTDEventName);

                StudentResults.DeleteWriteup();

                System.Threading.Thread.Sleep(30000);

                String style2 = StudentResults.VerifyEventIcon(strTDEventName);

                try
                {
                    Assert.IsTrue(style2.Contains("background-color: rgb(70, 136, 71)"));
                    PropertiesCollection.test.Log(Status.Pass, "Event is back at scheduled state prior to Scoring");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Event is at not back at scheduled state");
                    throw;
                }

                StudentResults.VerifyEventIcon(strTDEventName);
            }
Exemple #8
0
            public void TS03_TC03_Roster_ScheduleRoster()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS03_TC03_Roster_ScheduleRoster");
                String strtblname = "automation_shiftadministration";
                String OrgRoster  = "AT_Org Group1 - AT_Roster";

                var connection              = new ConnectToMySQL_Fetch_TestData();
                var SidebarMenu             = new FpSideMenus();
                var PersonnelScheduleRoster = new clsPersonnelSchedulingRoster();

                var testdataShift = connection.Select(strtblname, strTestCaseNo, strTestType);

                String strTDShiftName  = testdataShift[4];
                String strTDShortCode  = testdataShift[5];
                String strTDStartTime  = testdataShift[6];
                String strTDDuration   = testdataShift[7];
                String strTDCurrencies = testdataShift[8];
                String strTDStatus     = testdataShift[9];

                System.Threading.Thread.Sleep(1000);
                SidebarMenu.LnkRoster.Click();

                System.Threading.Thread.Sleep(4000);

                PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"divMainBody\"]/div[2]/div[2]/div[1]/div[1]/span/span/span[2]")).Click();

                // Get all of the options
                IList <IWebElement> options = PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"divMainBody\"]/div[2]/div[2]/div[1]/div[1]/span/select/option"));

                // Loop through the options and select the one that matches

                System.Console.WriteLine("Count of options =" + options.Count);

                for (int i = 0; i < options.Count; i++)
                {
                    System.Console.WriteLine("Option" + options.ElementAt(i));
                    if (options.ElementAt(i).Text.Equals(OrgRoster))
                    {
                        options.ElementAt(i).Click();
                        break;
                    }
                }

                PersonnelScheduleRoster.ScheduleRoster(strTDShiftName, strTDShortCode, strTDStartTime, strTDDuration, strTDCurrencies);
                System.Threading.Thread.Sleep(4000);
            }
Exemple #9
0
        public void US_42553_PreventCrossSiteScripts_StudentResults()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_41888_PreventMaliciousFileUpload_StudentResults_ValidDocuments");
            var strTestCaseNo          = "TC001";
            var connection             = new ConnectToMySQL_Fetch_TestData();
            var testdataStudentResults = connection.Select(strtblname, strTestCaseNo, strTestType);
            var sidebarMenu            = new FpSideMenus();
            var studentResults         = new FpStudentResultsPage();

            sidebarMenu.lnkStudentResults.Click();

            var strTDOrgnisationGroup       = testdataStudentResults[4];
            var strTDStudentName            = testdataStudentResults[5];
            var strTDInstructorName         = testdataStudentResults[6];
            var strTDCourseName             = testdataStudentResults[7];
            var strTDSyllabusName           = testdataStudentResults[8];
            var strTDEventName              = testdataStudentResults[9];
            var strTDScore                  = testdataStudentResults[10];
            var strTDScoreAssesmentCriteria = testdataStudentResults[11];
            var strTDStrength               = testdataStudentResults[12];
            var strTDWeakness               = testdataStudentResults[13];
            var strTDOverallComments        = testdataStudentResults[14];
            var strTDPrivateComments        = testdataStudentResults[15];
            var strTDServiceName            = testdataStudentResults[16];
            var strTDCountryName            = testdataStudentResults[17];
            var strTDStudentPosition        = testdataStudentResults[18];
            var strTDStudentSurname         = testdataStudentResults[19];
            var strTDResultAwarded          = testdataStudentResults[20];

            studentResults.SearchStudent(strTDStudentSurname);
            studentResults.SearchCourseEvent(strTDEventName);

            WebDriverWait wait = new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromSeconds(10));

            foreach (var script in crossSiteScripts)
            {
                studentResults.txtboxPrivateComments.SendKeys(script);
                studentResults.btnSave.Click();
                var lblPrivateComments = studentResults.GetTextPrivateComments();
                Assert.AreEqual(lblPrivateComments, script);
                System.Threading.Thread.Sleep(2000);
                studentResults.DeleteWriteup();
            }
        }
        public void US_38078_View_Workflow_Settings()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_38078_View_Workflow_Settings");
            FpSideMenus SideMenu = new FpSideMenus();

            System.Threading.Thread.Sleep(10000);
            SideMenu.LnkSummary.Click();
            FpSummaryPage Summary = new FpSummaryPage();

            var countlblWorkflowicon  = Summary.countlblWorkflowicon;
            var countlblworkflowTitle = Summary.countlblWorkflowicon;

            if (countlblWorkflowicon == 0 || countlblworkflowTitle == 0)
            {
                Summary.btnSettings.Click();
                SelectElement dropdown1 = new SelectElement(PropertiesCollection.driver.FindElement(By.Id("optionDisplaySettings")));
                dropdown1.SelectByValue("4");
                PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"saveDisplaySettings\"]")).Click();
                Assert.IsTrue(Summary.lblWorkflowTitle.Displayed);
                Assert.IsTrue(Summary.lblWorkflowicon.Displayed);
            }

            Summary.btnSettings.Click();
            System.Threading.Thread.Sleep(2000);

            for (int i = 0; i < Summary.countDisplaySetting.Count; i++)
            {
                if (Summary.DisplaySetting.ElementAt(i).Text.Equals("Workflows"))
                {
                    Summary.countDisplaySetting.ElementAt(i).Click();
                    break;
                }
            }
            System.Threading.Thread.Sleep(5000);
            var btnSave = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"saveDisplaySettings\"]"));

            System.Threading.Thread.Sleep(2000);
            btnSave.Click();
            System.Threading.Thread.Sleep(2000);
            Assert.AreEqual(Summary.countlblWorkflowTitle, 0);
            Assert.AreEqual(Summary.countlblWorkflowicon, 0);
        }
Exemple #11
0
        public void US_41889_PreventMaliciousFileUpload_KnowledgeBase_InvalidFiles()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_41889_PreventMaliciousFileUpload_KnowledgeBase_InvalidFiles");

            var connection     = new ConnectToMySQL_Fetch_TestData();
            var sidebarMenu    = new FpSideMenus();
            var knowledgeBase  = new FpKnowledgeBasePage();
            var folderLocation = "Malicious Files\\";

            sidebarMenu.KnowledgeBaseClick();
            System.Threading.Thread.Sleep(4000);

            foreach (var file in fileList_ValidVideoFiles)
            {
                System.Threading.Thread.Sleep(4000);
                knowledgeBase.btnAddKnowledgebaseByEntry.Click();
                System.Threading.Thread.Sleep(2000);
                knowledgeBase.btnBrowse.Click();
                System.Threading.Thread.Sleep(4000);
                AutoIt.AutoItX.ControlFocus("Open", "", "Edit1");
                AutoIt.AutoItX.ControlSetText("Open", "", "Edit1", System.Configuration.ConfigurationManager.AppSettings["MaliciousFileUploadLocation"] + folderLocation + file);
                AutoIt.AutoItX.ControlClick("Open", "", "Button1");
                System.Threading.Thread.Sleep(2000);
                knowledgeBase.btnSave.Click();
                System.Threading.Thread.Sleep(2000);

                string filename = knowledgeBase.grdFileNameRow.Text;
                try
                {
                    Assert.AreEqual(file, filename);
                    PropertiesCollection.test.Log(Status.Pass, "File: " + filename + " is successfully uploaded from Location: " + System.Configuration.ConfigurationManager.AppSettings["MaliciousFileUploadLocation"] + folderLocation);
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "File: " + filename + "is not successfully uploaded");
                }

                knowledgeBase.btnDelete.Click();
                IWebElement btnOKConfirmation = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"_0_btn_modal\"]"));
                btnOKConfirmation.Click();
            }
        }
        public void US_42249_View_WorkflowList_LinkedToColumn()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_42249_View_WorkflowList_LinkedToColumn");
            FpSideMenus SideMenu = new FpSideMenus();

            System.Threading.Thread.Sleep(10000);
            SideMenu.LnkSummary.Click();
            FpSummaryPage Summary = new FpSummaryPage();

            Assert.IsTrue(Summary.lblWorkflowTitle.Displayed);
            Assert.IsTrue(Summary.lblWorkflowicon.Displayed);
            Summary.btnSettings.Click();
            System.Threading.Thread.Sleep(2000);
            IWebElement element = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"extraOptions\"]/div/div[2]/div/div[2]/div"));

            new Actions(PropertiesCollection.driver).MoveToElement(element).MoveByOffset(10, 10).Click().Perform();
            SelectElement dropdown = new SelectElement(PropertiesCollection.driver.FindElement(By.Id("optionDisplaySettings")));

            dropdown.SelectByValue("0");
            PropertiesCollection.driver.FindElement(By.Id("saveDisplaySettings")).Click();

            Summary.btnSettings.Click();
            System.Threading.Thread.Sleep(2000);

            for (int i = 0; i < Summary.countDisplaySetting.Count; i++)
            {
                if (Summary.DisplaySetting.ElementAt(i).Text.Equals("Workflows"))
                {
                    Summary.countDisplaySetting.ElementAt(i).Click();
                    break;
                }
            }
            System.Threading.Thread.Sleep(5000);
            var btnSave = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"saveDisplaySettings\"]"));

            System.Threading.Thread.Sleep(2000);
            btnSave.Click();
            System.Threading.Thread.Sleep(2000);
            Assert.AreEqual(Summary.countlblWorkflowTitle, 0);
            Assert.AreEqual(Summary.countlblWorkflowicon, 0);
        }
            public void TS01_TC03_ValidateStudentResultsSideMenu()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC03_ValidateStudentResultsSideMenu");

                /* Validate Students Results Page */

                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.StudentResultsClick();
                System.Threading.Thread.Sleep(30000);
                PropertiesCollection.driver.SwitchTo().Frame("myFrame");
                FpStudentResultsPage StudentResults = new FpStudentResultsPage();

                try
                {
                    Assert.IsTrue(StudentResults.UserName.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Students Results Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Students Results Page not loaded");
                    throw;
                }
            }
            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");
                }
            }
            public void TS01_TC01_ValidateSideMenus()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC01_ValidateSideMenus");

                /* Validate Summary Page*/

                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.SummaryClick();
                System.Threading.Thread.Sleep(30000);
                FpSummaryPage Summary = new FpSummaryPage();

                try
                {
                    Assert.AreEqual(Summary.UserName.Text, "testuser2, AT");
                    PropertiesCollection.test.Log(Status.Pass, "Summary Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Summary Page not loaded");
                    throw;
                }

                /* Validate Calendar Page*/

                Actions actions = new Actions(PropertiesCollection.driver);

                actions.MoveToElement(SideMenu.LnkCalendar).Perform();
                System.Threading.Thread.Sleep(30000);

                SideMenu.CalendarClick();
                System.Threading.Thread.Sleep(30000);

                try
                {
                    //Assert.AreEqual(FpCalendarPage.GetLoggedInUserName(), "testuser2, AT");
                    PropertiesCollection.test.Log(Status.Pass, "Calendar Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Calendar Page not loaded");
                    throw;
                }

                /* Validate Control Hours Report Page*/

                SideMenu.ControlHoursReportClick();
                System.Threading.Thread.Sleep(30000);
                FpControlHoursReportPage ControlHoursReport = new FpControlHoursReportPage();

                try
                {
                    Assert.AreEqual(ControlHoursReport.GetReportName(), "Control Hours Report");
                    PropertiesCollection.test.Log(Status.Pass, "Control Hours Report Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Control Hours Report Page not loaded");
                    throw;
                }

                /* Validate Currency History Report Page*/

                SideMenu.CurrencyHistoryReportClick();
                System.Threading.Thread.Sleep(30000);
                FpCurrencyHistoryReportPage CurrencyHistoryReport = new FpCurrencyHistoryReportPage();

                try
                {
                    Assert.AreEqual(CurrencyHistoryReport.GetReportName(), "Currency History Report");
                    PropertiesCollection.test.Log(Status.Pass, "Currency History Report Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Currency History Report Page not loaded");
                    throw;
                }

                /* Validate Events Report Page*/

                SideMenu.EventsReportClick();
                System.Threading.Thread.Sleep(30000);
                FpEventsReportPage EventsReport = new FpEventsReportPage();

                try
                {
                    Assert.AreEqual(EventsReport.GetReportName(), "Events Report");
                    PropertiesCollection.test.Log(Status.Pass, "Events Report Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Events Report Page not loaded");
                    throw;
                }

                /*Validate Roster Page */

                SideMenu.RosterClick();
                System.Threading.Thread.Sleep(30000);
                FpRosterPage Roster = new FpRosterPage();

                try
                {
                    Assert.IsTrue(Roster.RosterTable.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Roster Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Roster Page not loaded");
                    throw;
                }

                /* Validate Daily Scheduling Page*/

                SideMenu.DailySchedulingClick();
                System.Threading.Thread.Sleep(30000);
                FpDailySchedulingPage DailyScheduling = new FpDailySchedulingPage();

                try
                {
                    Assert.IsTrue(DailyScheduling.Table.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Daily Scheduling Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Daily Scheduling Page not loaded");
                    throw;
                }

                /* Validate Duty Times Page*/

                SideMenu.DutyTimesClick();
                System.Threading.Thread.Sleep(30000);
                FpControlHoursPage DutyTimes = new FpControlHoursPage();

                try
                {
                    Assert.AreEqual((DutyTimes.Title()), "testuser2, AT");
                    PropertiesCollection.test.Log(Status.Pass, "Duty Times Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Duty Times Page not loaded");
                    throw;
                }

                /* Validate Control Hours Page*/

                SideMenu.ControlHoursClick();
                System.Threading.Thread.Sleep(30000);
                FPControlHoursPage ControlHours = new FPControlHoursPage();

                try
                {
                    Assert.AreEqual((ControlHours.Title()), "Control Hours");
                    PropertiesCollection.test.Log(Status.Pass, "Control Hours Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Control Hours Page not loaded");
                    throw;
                }

                /* Validate Programme Viewer Page */

                SideMenu.ProgrammeViewerClick();
                System.Threading.Thread.Sleep(30000);
                FpProgrammeViewerPage ProgrammeViewer = new FpProgrammeViewerPage();

                try
                {
                    Assert.IsTrue(ProgrammeViewer.Grid.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Programme Viewer Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Programme Viewer Page not loaded");
                    throw;
                }

                /* Validate Knowledge Base Page */

                SideMenu.KnowledgeBaseClick();
                System.Threading.Thread.Sleep(30000);
                FpKnowledgeBasePage KnowledgeBase = new FpKnowledgeBasePage();

                try
                {
                    Assert.IsTrue(KnowledgeBase.RowValue.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Knowledge Base Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Knowledge Base Page not loaded");
                    throw;
                }

                /* validate status board page*/

                SideMenu.LnkStatusBoard.Click();
                System.Threading.Thread.Sleep(5000);
                FpStatusBoardPage StatusBoard = new FpStatusBoardPage();

                try
                {
                    Assert.IsTrue(StatusBoard.StatusBoard.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Status Board Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Status Board Page not loaded");
                    throw;
                }

                /* Validate Combined Schedule Page */

                SideMenu.CombinedScheduleClick();
                System.Threading.Thread.Sleep(30000);
                FpCombinedSchedulePage CombinedSchedule = new FpCombinedSchedulePage();

                PropertiesCollection.driver.SwitchTo().Frame(CombinedSchedule.frame);

                try
                {
                    Assert.IsTrue(CombinedSchedule.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Combined Schedule Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Combined Schedule Page not loaded");
                    throw;
                }
            }
Exemple #16
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;
                    }
                }
                
            }
            public void Update_Knowledbase_Item_UserWithoutSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Update Knowledgebase Item assigned to user without SO 31 access and without restricted viewing");

                String strTestCaseNo = "TC003";
                String strtblname    = "automation_summary_knowledgebase";
                String strTestType   = "Progression";


                /* Get test data from MySQL */

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


                string strTDTitle           = testdataSummary_Knowledgebase[3];
                string strTDVersion         = testdataSummary_Knowledgebase[5];
                string strTDDate            = testdataSummary_Knowledgebase[6];
                string strTDRestrictViewing = testdataSummary_Knowledgebase[7];
                string strTDYourDate        = testdataSummary_Knowledgebase[8];
                string strTDYourVersion     = testdataSummary_Knowledgebase[9];
                string strTDStatus          = testdataSummary_Knowledgebase[10];
                string strTDUser            = testdataSummary_Knowledgebase[11];
                string strTDUpdatedVersion  = testdataSummary_Knowledgebase[12];
                string strTDUpdatedContent  = testdataSummary_Knowledgebase[13];
                string strTDOtherUser       = testdataSummary_Knowledgebase[16];
                string strTDOtherLogin      = testdataSummary_Knowledgebase[17];
                string strTDUpdatedStatus   = testdataSummary_Knowledgebase[18];
                string strTDLogin           = testdataSummary_Knowledgebase[20];

                ConnectToMySQL_Fetch_TestData MySQLConnect = new ConnectToMySQL_Fetch_TestData();

                String[] TestData = new string[3];
                TestData = MySQLConnect.GetLoginDetails(strTDLogin);

                string strTDUsername = TestData[1];
                string strTDPassword = TestData[2];

                FpLoginPage loginPage = new FpLoginPage();

                loginPage.LoginWithUserCredentials(strTDUsername, strTDPassword);

                /* Calculate Days Old */

                string strTDDaysOld = GetDaysOldUnreadKnowledgeBaseItem(Convert.ToDateTime(strTDDate)).ToString();

                Console.WriteLine(strTDDaysOld);

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                Knowledgebase.Update_Knowledgebase_Item(strTDTitle, strTDUpdatedVersion, strTDUpdatedContent);
                System.Threading.Thread.Sleep(15000);
                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.SummaryClick();
                System.Threading.Thread.Sleep(15000);

                FpSummaryPage Summary = new FpSummaryPage();

                String[] Knowledgebasedetails = Summary.RetrieveKnowledgebaseGriddetails(strTDTitle);
                String   strFPwebItem         = Knowledgebasedetails[0];
                String   strFPwebNowDated     = Knowledgebasedetails[1];
                String   strFPwebYourDate     = Knowledgebasedetails[2];
                String   strFPwebNowVersioned = Knowledgebasedetails[3];
                String   strFPwebYourVersion  = Knowledgebasedetails[4];
                String   strFPwebDaysOld      = Knowledgebasedetails[5];
                String   strFPwebStatus       = Knowledgebasedetails[6];


                System.Threading.Thread.Sleep(15000);

                /* Validate for logged in user */

                /* Validate Item column */
                try
                {
                    Assert.AreEqual(strTDTitle, strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Item column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Item column on grid validated and failed");
                }

                /* Validate Now Dated column */
                try
                {
                    Assert.AreEqual(strTDDate, strFPwebNowDated);
                    PropertiesCollection.test.Log(Status.Pass, "Now Dated column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Dated column on grid validated and failed");
                }

                /* Validate Your Date column */
                try
                {
                    Assert.AreEqual(DateTime.Now.ToString("dd MMM yyyy"), strFPwebYourDate);
                    PropertiesCollection.test.Log(Status.Pass, "Your Date column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Date column on grid validated and failed");
                }

                /* Validate Now Versioned column */
                try
                {
                    Assert.AreEqual(strTDUpdatedVersion, strFPwebNowVersioned);
                    PropertiesCollection.test.Log(Status.Pass, "Now Versioned column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Versioned column on grid validated and failed");
                }

                /* Validate Your Version column */
                try
                {
                    Assert.AreEqual(strTDVersion, strFPwebYourVersion);
                    PropertiesCollection.test.Log(Status.Pass, "Your Version column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Version column on grid validated and failed");
                }

                /* Validate Days Old column */

                try
                {
                    Assert.AreEqual(strTDDaysOld, strFPwebDaysOld);
                    PropertiesCollection.test.Log(Status.Pass, "Days Old column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Days Old column on grid validated and failed");
                }

                /* Validate Status column */
                try
                {
                    Assert.AreEqual(strTDUpdatedStatus, strFPwebStatus);
                    PropertiesCollection.test.Log(Status.Pass, "Status column on grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Status column on grid validated and failed");
                }

                int Never = Summary.RetrieveKnowledgebaseNeverCount();
                int Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items validated and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items validated and failed");
                }

                /* Validate for other user */

                Summary.BtnPeopleSelector.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.TxtPeopleSearch.SendKeys(strTDOtherUser);
                System.Threading.Thread.Sleep(5000);
                Summary.BtnSearch.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.PersonSelection.Click();
                System.Threading.Thread.Sleep(15000);
                Summary.BtnApply.Click();
                System.Threading.Thread.Sleep(5000);

                try
                {
                    Assert.IsTrue(Summary.LblNoData.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Update Knowledgebase Item  for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Update Knowledgebase Item for other user validated and failed");
                }
                Never = Summary.RetrieveKnowledgebaseNeverCount();
                Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items for other user validated and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items for other user validated and failed");
                }
            }
            public void Add_Knowledbase_Item_OrgGroupForUserWithSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Add Knowledgebase Item assigned to Org Group where user has SO 31 access and without restricted viewing");

                String strTestCaseNo = "TC005";
                String strtblname    = "automation_summary_knowledgebase";
                String strTestType   = "Progression";


                /* Get test data from MySQL */

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


                string strTDTitle           = testdataSummary_Knowledgebase[3];
                string strTDContent         = testdataSummary_Knowledgebase[4];
                string strTDVersion         = testdataSummary_Knowledgebase[5];
                string strTDDate            = testdataSummary_Knowledgebase[6];
                string strTDRestrictViewing = testdataSummary_Knowledgebase[7];
                string strTDYourDate        = testdataSummary_Knowledgebase[8];
                string strTDYourVersion     = testdataSummary_Knowledgebase[9];
                string strTDStatus          = testdataSummary_Knowledgebase[10];
                string strTDUser            = testdataSummary_Knowledgebase[11];
                string strTDOtherUser       = testdataSummary_Knowledgebase[16];
                string strTDLogin           = testdataSummary_Knowledgebase[20];

                /* Calculate Days Old */

                string strTDDaysOld = GetDaysOldUnreadKnowledgeBaseItem(Convert.ToDateTime(strTDDate)).ToString();

                Console.WriteLine(strTDDaysOld);

                /* Identify OrgGroupId for the OrgGroup */

                string strSQLtblname      = "tblPeopleGroup";
                string strtblselectcolumn = "PeopleGroupID";
                string strtblcolumn       = "PeopleGroupName";
                string strwherecondn      = strTDUser;
                var    conn       = new ConnectToSQLServer();
                string OrgGroupID = conn.Select(strSQLtblname, strtblselectcolumn, strtblcolumn, strwherecondn);


                /* Identify OrgGroupId for second OrgGroup */


                strwherecondn = strTDOtherUser;
                conn          = new ConnectToSQLServer();
                string OrgGroupIDOther = conn.Select(strSQLtblname, strtblselectcolumn, strtblcolumn, strwherecondn);

                /* Add Knowledgebase item and assign to user with SO 31 access and without restricted viewing */

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                System.Threading.Thread.Sleep(15000);
                Knowledgebase.Add_Knowledgebase_Item_AssigntoOrgGroup(strTDTitle, strTDContent, strTDVersion, strTDDate, strTDRestrictViewing, OrgGroupID, OrgGroupIDOther);
                System.Threading.Thread.Sleep(15000);
                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.SummaryClick();
                System.Threading.Thread.Sleep(15000);
                FpSummaryPage Summary = new FpSummaryPage();

                String[] Knowledgebasedetails = Summary.RetrieveKnowledgebaseGriddetails(strTDTitle);
                String   strFPwebItem         = Knowledgebasedetails[0];
                String   strFPwebNowDated     = Knowledgebasedetails[1];
                String   strFPwebYourDate     = Knowledgebasedetails[2];
                String   strFPwebNowVersioned = Knowledgebasedetails[3];
                String   strFPwebYourVersion  = Knowledgebasedetails[4];
                String   strFPwebDaysOld      = Knowledgebasedetails[5];
                String   strFPwebStatus       = Knowledgebasedetails[6];


                ConnectToMySQL_Fetch_TestData MySQLConnect = new ConnectToMySQL_Fetch_TestData();

                String[] TestData = new string[3];
                TestData = MySQLConnect.GetLoginDetails(strTDLogin);

                string strTDUsername = TestData[1];
                string strTDPassword = TestData[2];

                FpLoginPage loginPage = new FpLoginPage();

                loginPage.LoginWithUserCredentials(strTDUsername, strTDPassword);

                System.Threading.Thread.Sleep(15000);

                /* Validate for logged in user */

                /* Validate Item column */
                try
                {
                    Assert.AreEqual(strTDTitle, strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Item column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Item column on grid validated for logged in user and failed");
                }

                /* Validate Now Dated column */
                try
                {
                    Assert.AreEqual(strTDDate, strFPwebNowDated);
                    PropertiesCollection.test.Log(Status.Pass, "Now Dated column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Dated column on grid validated for logged in user and failed");
                }

                /* Validate Your Date column */
                try
                {
                    Assert.AreEqual(strTDYourDate, strFPwebYourDate);
                    PropertiesCollection.test.Log(Status.Pass, "Your Date column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Date column on grid validated for logged in user and failed");
                }

                /* Validate Now Versioned column */
                try
                {
                    Assert.AreEqual(strTDVersion, strFPwebNowVersioned);
                    PropertiesCollection.test.Log(Status.Pass, "Now Versioned column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Versioned column on grid validated for logged in user and failed");
                }

                /* Validate Your Version column */
                try
                {
                    Assert.AreEqual(strTDYourVersion, strFPwebYourVersion);
                    PropertiesCollection.test.Log(Status.Pass, "Your Version column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Version column on grid validated for logged in user and failed");
                }

                /* Validate Days Old column */

                try
                {
                    Assert.AreEqual(strTDDaysOld, strFPwebDaysOld);
                    PropertiesCollection.test.Log(Status.Pass, "Days Old column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Days Old column on grid validated for logged in user and failed");
                }

                /* Validate Status column */
                try
                {
                    Assert.AreEqual(strTDStatus, strFPwebStatus);
                    PropertiesCollection.test.Log(Status.Pass, "Status column on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Status column on grid validated for logged in user and failed");
                }

                int Never = Summary.RetrieveKnowledgebaseNeverCount();
                int Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items validated and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items validated for logged in user and failed");
                }

                System.Threading.Thread.Sleep(5000);

                /* Validation for other user */

                Summary.BtnPeopleSelector.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.TxtPeopleSearch.SendKeys(strTDOtherUser);
                System.Threading.Thread.Sleep(5000);
                Summary.BtnSearch.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.PersonSelection.Click();
                System.Threading.Thread.Sleep(15000);
                Summary.BtnApply.Click();
                System.Threading.Thread.Sleep(5000);

                /* Validate Item column */
                try
                {
                    Assert.AreEqual(strTDTitle, strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Item column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Item column on grid validated for other user and failed");
                }

                /* Validate Now Dated column */
                try
                {
                    Assert.AreEqual(strTDDate, strFPwebNowDated);
                    PropertiesCollection.test.Log(Status.Pass, "Now Dated column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Dated column on grid validated for other user and failed");
                }

                /* Validate Your Date column */
                try
                {
                    Assert.AreEqual(strTDYourDate, strFPwebYourDate);
                    PropertiesCollection.test.Log(Status.Pass, "Your Date column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Date column on grid validated for other user and failed");
                }

                /* Validate Now Versioned column */
                try
                {
                    Assert.AreEqual(strTDVersion, strFPwebNowVersioned);
                    PropertiesCollection.test.Log(Status.Pass, "Now Versioned column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Now Versioned column on grid validated for other user and failed");
                }

                /* Validate Your Version column */
                try
                {
                    Assert.AreEqual(strTDYourVersion, strFPwebYourVersion);
                    PropertiesCollection.test.Log(Status.Pass, "Your Version column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Your Version column on grid validated for other user and failed");
                }

                /* Validate Days Old column */

                try
                {
                    Assert.AreEqual(strTDDaysOld, strFPwebDaysOld);
                    PropertiesCollection.test.Log(Status.Pass, "Days Old column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Days Old column on grid validated for other user and failed");
                }

                /* Validate Status column */
                try
                {
                    Assert.AreEqual(strTDStatus, strFPwebStatus);
                    PropertiesCollection.test.Log(Status.Pass, "Status column on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Status column on grid validated for other user and failed");
                }

                Never = Summary.RetrieveKnowledgebaseNeverCount();
                Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items validated for other user and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items validated for other user and failed");
                }
            }
Exemple #19
0
        public void US_41888_PreventMaliciousFileUpload_StudentResults_InvalidFiles()
        {
            PropertiesCollection.test = PropertiesCollection.extent.CreateTest("US_41888_PreventMaliciousFileUpload_StudentResults_InvalidFiles");
            var strTestCaseNo          = "TC005";
            var connection             = new ConnectToMySQL_Fetch_TestData();
            var testdataStudentResults = connection.Select(strtblname, strTestCaseNo, strTestType);
            var sidebarMenu            = new FpSideMenus();
            var studentResults         = new FpStudentResultsPage();
            var folderLocation         = "Malicious Files\\";

            sidebarMenu.lnkStudentResults.Click();

            string strTDOrgnisationGroup       = testdataStudentResults[4];
            string strTDStudentName            = testdataStudentResults[5];
            string strTDInstructorName         = testdataStudentResults[6];
            string strTDCourseName             = testdataStudentResults[7];
            string strTDSyllabusName           = testdataStudentResults[8];
            string strTDEventName              = testdataStudentResults[9];
            string strTDScore                  = testdataStudentResults[10];
            string strTDScoreAssesmentCriteria = testdataStudentResults[11];
            string strTDStrength               = testdataStudentResults[12];
            string strTDWeakness               = testdataStudentResults[13];
            string strTDOverallComments        = testdataStudentResults[14];
            string strTDPrivateComments        = testdataStudentResults[15];
            string strTDServiceName            = testdataStudentResults[16];
            string strTDCountryName            = testdataStudentResults[17];
            string strTDStudentPosition        = testdataStudentResults[18];
            string strTDStudentSurname         = testdataStudentResults[19];
            string strTDResultAwarded          = testdataStudentResults[20];

            studentResults.SearchStudent(strTDStudentSurname);
            studentResults.SearchCourseEvent(strTDEventName);

            string style = studentResults.VerifyEventIcon(strTDEventName);

            if (style.Contains("background-color: rgb(70, 136, 71)") == false)
            {
                studentResults.DeleteWriteup();
            }
            WebDriverWait wait = new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromSeconds(10));

            Console.WriteLine("The number of rows:" + PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr/td[1]")).Count);
            int Count = PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr/td[1]")).Count;

            for (int i = 0; i <= Count; i++)
            {
                System.Threading.Thread.Sleep(2000);
                if (PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr[1]/td[5]/div/dx-button")).Count != 0)
                {
                    IWebElement btnRemove = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr[1]/td[5]/div/dx-button"));
                    btnRemove.Click();
                    System.Threading.Thread.Sleep(2000);
                    IWebElement btnYesPopup = PropertiesCollection.driver.FindElement(By.XPath("/html/body/div[2]/div/div/div[3]/div/div[2]/div[1]/div/div"));
                    btnYesPopup.Click();
                    System.Threading.Thread.Sleep(2000);
                }
            }

            int count = 0;

            foreach (var file in fileList_InvalidFiles)
            {
                IWebElement btnAddDocument = wait.Until(ExpectedConditions.ElementToBeClickable(PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"psr-file-uploader\"]/div/div/div/div[1]/div[1]/div/span"))));
                btnAddDocument.Click();
                System.Threading.Thread.Sleep(2000);
                AutoIt.AutoItX.ControlFocus("Open", "", "Edit1");
                AutoIt.AutoItX.ControlSetText("Open", "", "Edit1", System.Configuration.ConfigurationManager.AppSettings["MaliciousFileUploadLocation"] + folderLocation + file);
                AutoIt.AutoItX.ControlClick("Open", "", "Button1");
                System.Threading.Thread.Sleep(3000);
                PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"psr-file-uploader\"]/div/div/div/div[3]/div/div[2]/div/div")).Click();
                System.Threading.Thread.Sleep(2000);

                IList <IWebElement> fileNames = PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr/td[1]"));
                System.Threading.Thread.Sleep(3000);

                if (count <= fileNames.Count)
                {
                    if (count == 0)
                    {
                        string filename = fileNames.First().Text;
                        System.Threading.Thread.Sleep(2000);
                        try
                        {
                            Assert.AreEqual(file, filename);
                            PropertiesCollection.test.Log(Status.Pass, "File: " + filename + "is successfully uploaded");
                        }
                        catch
                        {
                            PropertiesCollection.test.Log(Status.Fail, "File: " + filename + "is not successfully uploaded");
                        }
                    }
                    else
                    {
                        string filename = fileNames.ElementAt(count).Text;
                        try
                        {
                            Assert.AreEqual(file, filename);
                            PropertiesCollection.test.Log(Status.Pass, "File: " + filename + "is successfully uploaded");
                        }
                        catch
                        {
                            PropertiesCollection.test.Log(Status.Fail, "File: " + filename + "is not successfully uploaded");
                        }
                    }
                    count = count + 1;
                }
            }

            Console.WriteLine("The number of rows:" + PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr/td[1]")).Count);
            Count = PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr/td[1]")).Count;

            for (int i = 0; i <= Count; i++)
            {
                System.Threading.Thread.Sleep(2000);

                if (PropertiesCollection.driver.FindElements(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr[1]/td[5]/div/dx-button")).Count != 0)
                {
                    IWebElement btnRemove = PropertiesCollection.driver.FindElement(By.XPath("//*[@id=\"documentsGrid\"]/div/div[6]/div/div/div[1]/div/table/tbody/tr[1]/td[5]/div/dx-button"));
                    btnRemove.Click();
                    System.Threading.Thread.Sleep(2000);
                    IWebElement btnYesPopup = PropertiesCollection.driver.FindElement(By.XPath("/html/body/div[2]/div/div/div[3]/div/div[2]/div[1]/div/div"));
                    btnYesPopup.Click();
                    System.Threading.Thread.Sleep(2000);
                }
            }
        }
Exemple #20
0
            public void MarkAsRead_Knowledbase_Item_OrgGroupForUserWithoutSO31_WithRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Mark As Read Knowledgebase Item assigned to Org Group where user does not have SO 31 access and with restricted viewing");

                String strTestCaseNo = "TC008";
                String strtblname    = "automation_summary_knowledgebase";
                String strTestType   = "Progression";


                /* Get test data from MySQL */

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


                string strTDTitle     = testdataSummary_Knowledgebase[3];
                string strTDOtherUser = testdataSummary_Knowledgebase[16];
                string strTDLogin     = testdataSummary_Knowledgebase[20];

                ConnectToMySQL_Fetch_TestData MySQLConnect = new ConnectToMySQL_Fetch_TestData();

                String[] TestData = new string[3];
                TestData = MySQLConnect.GetLoginDetails(strTDLogin);

                string strTDUsername = TestData[1];
                string strTDPassword = TestData[2];

                Console.WriteLine(strTDUsername);
                Console.WriteLine(strTDPassword);

                FpLoginPage loginPage = new FpLoginPage();

                loginPage.LoginWithUserCredentials(strTDUsername, strTDPassword);

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                Knowledgebase.MarkAsRead_Knowledgebase_Item(strTDTitle);

                System.Threading.Thread.Sleep(15000);
                FpSideMenus SideMenu = new FpSideMenus();

                SideMenu.SummaryClick();
                System.Threading.Thread.Sleep(15000);

                FpSummaryPage Summary = new FpSummaryPage();

                String[] Knowledgebasedetails = Summary.RetrieveKnowledgebaseGriddetails(strTDTitle);
                String   strFPwebItem         = Knowledgebasedetails[0];
                String   strFPwebNowDated     = Knowledgebasedetails[1];
                String   strFPwebYourDate     = Knowledgebasedetails[2];
                String   strFPwebNowVersioned = Knowledgebasedetails[3];
                String   strFPwebYourVersion  = Knowledgebasedetails[4];
                String   strFPwebDaysOld      = Knowledgebasedetails[5];
                String   strFPwebStatus       = Knowledgebasedetails[6];

                /* Validate for logged in user */

                /* Validate Item  */
                try
                {
                    Assert.IsNull(strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Data on grid validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Data on grid validated for logged in user and failed");
                }

                System.Threading.Thread.Sleep(15000);

                int Never = Summary.RetrieveKnowledgebaseNeverCount();
                int Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items validated for logged in user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items validated for logged in user and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items validated and for logged in user passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items validated and for logged in user failed");
                }

                /* Validate for other user */

                Summary.BtnPeopleSelector.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.TxtPeopleSearch.SendKeys(strTDOtherUser);
                System.Threading.Thread.Sleep(5000);
                Summary.BtnSearch.Click();
                System.Threading.Thread.Sleep(5000);
                Summary.PersonSelection.Click();
                System.Threading.Thread.Sleep(15000);
                Summary.BtnApply.Click();
                System.Threading.Thread.Sleep(5000);

                /* Validate Item  */
                try
                {
                    Assert.IsNull(strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Data on grid for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Data on grid for other user validated and failed");
                }

                Never = Summary.RetrieveKnowledgebaseNeverCount();
                Old   = Summary.RetrieveKnowledgebaseOldCount();

                try
                {
                    Assert.AreEqual(Never, Convert.ToInt32(Summary.CountNever.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Never items for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Never items for other user validated and failed");
                }

                try
                {
                    Assert.AreEqual(Old, Convert.ToInt32(Summary.CountOld.Text.Substring(0, 1)));
                    PropertiesCollection.test.Log(Status.Pass, "Count of Old items for other user validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Count of Old items for other user validated and failed");
                }
            }
            public void TS02_TC01_StudentResults_ScoreEvent()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS02_TC01_StudentResults_ScoreEvents");

                var connection             = new ConnectToMySQL_Fetch_TestData();
                var testdataStudentResults = connection.Select(strtblname, strTestCaseNo, strTestType);
                var SidebarMenu            = new FpSideMenus();
                var StudentResults         = new FpStudentResultsPage();

                String[] headerfields;
                SidebarMenu.lnkStudentResults.Click();

                String strTDOrgnisationGroup       = testdataStudentResults[4];
                String strTDStudentName            = testdataStudentResults[5];
                String strTDInstructorName         = testdataStudentResults[6];
                String strTDCourseName             = testdataStudentResults[7];
                String strTDSyllabusName           = testdataStudentResults[8];
                String strTDEventName              = testdataStudentResults[9];
                String strTDScore                  = testdataStudentResults[10];
                String strTDScoreAssesmentCriteria = testdataStudentResults[11];
                String strTDStrength               = testdataStudentResults[12];
                String strTDWeakness               = testdataStudentResults[13];
                String strTDOverallComments        = testdataStudentResults[14];
                String strTDPrivateComments        = testdataStudentResults[15];
                String strTDServiceName            = testdataStudentResults[16];
                String strTDCountryName            = testdataStudentResults[17];
                String strTDStudentPosition        = testdataStudentResults[18];
                String strTDStudentSurname         = testdataStudentResults[19];
                String strTDResultAwarded          = testdataStudentResults[20];

                StudentResults.SearchStudent(strTDStudentSurname);
                StudentResults.SearchCourseEvent(strTDEventName);

                String style = StudentResults.VerifyEventIcon(strTDEventName);

                if (style.Contains("background-color: rgb(70, 136, 71)") == false)
                {
                    StudentResults.DeleteWriteup();
                }

                System.Threading.Thread.Sleep(60000);

                String style2 = StudentResults.VerifyEventIcon(strTDEventName);

                try
                {
                    Assert.IsTrue(style2.Contains("background-color: rgb(70, 136, 71)"));
                    PropertiesCollection.test.Log(Status.Pass, "Event is at scheduled state prior to Scoring");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Event is at not at scheduled state");
                }


                headerfields = StudentResults.ValidateHeaderFields();


                String strfbwebstudentname    = headerfields[0];
                String strfbwebservicename    = headerfields[1];
                String strfbwebgroupname      = headerfields[2];
                String strfbwebInstructorName = headerfields[3];
                String strfbwebCoursename     = headerfields[4];
                String strfbwebCountryName    = headerfields[5];
                String strfbwebEventName      = headerfields[6];

                StudentResults.EnterPrivate_OverallComments(strTDOverallComments, strTDPrivateComments);

                try
                {
                    Assert.AreEqual(strTDStudentPosition + " " + strTDStudentName, strfbwebstudentname);
                    PropertiesCollection.test.Log(Status.Pass, "Student Name: " + strfbwebstudentname + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "StudentName or Student Position not matching");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDOrgnisationGroup, strfbwebgroupname);
                    PropertiesCollection.test.Log(Status.Pass, "Organisation Group Name: " + strfbwebgroupname + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Organisation Group Name is not matching at header fields");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDServiceName, strfbwebservicename);
                    PropertiesCollection.test.Log(Status.Pass, "Service Name: " + strfbwebservicename + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Service Name is not matching at header fields");
                    throw;
                }

                Console.WriteLine("Instructorname from Test Data Table=" + strTDInstructorName);
                Console.WriteLine("Instructorname from fpweb=" + strfbwebInstructorName);

                try
                {
                    Assert.AreEqual(strTDInstructorName, strfbwebInstructorName);
                    //   PropertiesCollection.test.Log(Status.Pass, "Instructor Name: " + strfbwebInstructorName + " validated at header fields");
                    Console.WriteLine("Instructorname from Test Data Table=" + strTDInstructorName);
                    Console.WriteLine("Instructorname from fpweb=" + strfbwebInstructorName);
                }
                catch
                {
                    //   PropertiesCollection.test.Log(Status.Fail, "Instructor Name is not matching at header fields");
                }

                try
                {
                    Assert.AreEqual(strTDCourseName, strfbwebCoursename);
                    PropertiesCollection.test.Log(Status.Pass, "Course Name: " + strfbwebCoursename + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Course Name is not matching at header fields");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDEventName, strfbwebEventName);
                    PropertiesCollection.test.Log(Status.Pass, "Event Name: " + strfbwebEventName + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Event Name is not matching at header fields");
                    throw;
                }

                try
                {
                    Assert.AreEqual(strTDCountryName, strfbwebCountryName);
                    PropertiesCollection.test.Log(Status.Pass, "Country Name: " + strfbwebCountryName + " validated at header fields");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Country Name is not matching at header fields");
                    throw;
                }

                // StudentResults.addAdditionalCategories("AT_Category2", "ATS2","ATW3");

                StudentResults.ScoringEvent(strTDScore);
                StudentResults.VerifyEventIcon(strTDEventName);

                /*******************Validation of Result Awarded************************************/

                String ResultAwarded = StudentResults.VerifyResultAwarded();

                try
                {
                    Assert.AreEqual(ResultAwarded, strTDResultAwarded);
                    PropertiesCollection.test.Log(Status.Pass, "Result Awarded is: " + ResultAwarded);
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Result Awarded has incorrect State as: " + ResultAwarded);
                    throw;
                }

                String BGcolour = StudentResults.VerifyResultAwardedBGColour();

                try
                {
                    Assert.IsTrue(BGcolour.Contains("background-color: rgb(70, 136, 71)"));
                    PropertiesCollection.test.Log(Status.Pass, "Result Awarded has Background colour as: " + BGcolour);
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Result Awarded has incorrect Background coulour as: " + BGcolour);
                    throw;
                }


                /******************* Validation of Status Indicator **********************************/

                String style1 = StudentResults.VerifyEventIcon(strTDEventName);

                System.Threading.Thread.Sleep(15000);
                try
                {
                    Assert.IsTrue(style1.Contains("background-color: cornflowerblue"));
                    PropertiesCollection.test.Log(Status.Pass, "Status Indicator for Event is at Completed and Passed state");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Status Indicator for Event has not got completed and Passed");
                    throw;
                }



                string strfbwebOverallComments = StudentResults.GetTextOverallComments();

                try
                {
                    Assert.AreEqual(strTDOverallComments, strfbwebOverallComments);
                    PropertiesCollection.test.Log(Status.Pass, "Overall Comments in the Student Result Page matches: " + strTDOverallComments);
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Overall Comments are not matching in the Student Results Page");
                    throw;
                }

                string strfbwebPrivateComments = StudentResults.GetTextPrivateComments();

                try
                {
                    Assert.AreEqual(strTDPrivateComments, strfbwebPrivateComments);
                    PropertiesCollection.test.Log(Status.Pass, "Private Comments in the Student Result Page matches: " + strTDPrivateComments);
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Private Comments are not matching in the Student Results Page");
                    throw;
                }
            }