Esempio n. 1
0
        public void TestInitialize()
        {
            PropertiesCollection.driver = new ChromeDriver(System.Configuration.ConfigurationManager.AppSettings["ChromeDriverPath"]);
            PropertiesCollection.driver.Manage().Window.Maximize();
            FpLoginPage loginPage = new FpLoginPage();

            loginPage.Login();
        }
        public static void ClassInitialize(TestContext context)
        {
            PropertiesCollection.driver = new ChromeDriver(@ConfigurationManager.AppSettings["ChromeDriverPath"]);
            PropertiesCollection.driver.Manage().Window.Maximize();
            FpLoginPage loginPage = new FpLoginPage();

            loginPage.Login();
        }
Esempio n. 3
0
 public void TestInitialize()
 {
      TC01_ValidateSideMenus.IncrementTests();
      PropertiesCollection.driver = new ChromeDriver(@ConfigurationManager.AppSettings["ChromeDriverPath"]);
     PropertiesCollection.driver.Manage().Window.Maximize();
     FpLoginPage loginPage = new FpLoginPage();
     loginPage.Login();
 }
Esempio n. 4
0
            public void Delete_Knowledbase_Item_OrgGroupForUserWithoutSO31_WithRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Delete 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 strTDRestrictViewing = testdataSummary_Knowledgebase[7];
                string strTDUser            = testdataSummary_Knowledgebase[11];
                string strTDLogin           = testdataSummary_Knowledgebase[20];

                /* 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);


                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);

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                Knowledgebase.Delete_Knowledgebase_Item_AssignedtoOrgGroup(strTDTitle, strTDRestrictViewing, OrgGroupID);

                try
                {
                    Assert.IsTrue(Knowledgebase.txtKBItem.Displayed);
                    PropertiesCollection.test.Log(Status.Fail, "Knowledgebase Item could not be deleted");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Pass, "Knowledgebase Item deleted");
                }
            }
            public void Launch_Knowledbase_Item_UserWithoutSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Launch 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 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);
                System.Threading.Thread.Sleep(15000);

                /* Launch Knowledge base item from Knowledge base Grid */
                FpSummaryPage Summary     = new FpSummaryPage();
                string        KBGridTitle = Summary.KnowledgebaseGridFirstItem.Text;

                Actions action = new Actions(PropertiesCollection.driver);

                action.MoveToElement(Summary.KnowledgebaseGridFirstItem).DoubleClick().Perform();
                System.Threading.Thread.Sleep(15000);

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                System.Threading.Thread.Sleep(15000);
                try
                {
                    Assert.AreEqual(KBGridTitle, Knowledgebase.txtKBItemTitle.Text);
                    PropertiesCollection.test.Log(Status.Pass, "Launch Knowledgebase Item validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Launch Knowledgebase Item validated and failed");
                }
            }
Esempio n. 6
0
            public void TestInitialize()
            {
                PropertiesCollection.driver = new ChromeDriver(ConfigurationManager.AppSettings["ChromeDriverPath"]);
                PropertiesCollection.driver.Manage().Window.Maximize();
                ConnectToMySQL_Fetch_TestData MySQLConnect = new ConnectToMySQL_Fetch_TestData();

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

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

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

                FpLoginPage loginPage = new FpLoginPage();

                loginPage.LoginWithUserCredentials(strTDUsername, strTDPassword);
            }
            public void Verify_Knowledbase_Grid_OrgGroupForUserWithSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Validate 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 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);

                FpSummaryPage Summary = new FpSummaryPage();

                System.Threading.Thread.Sleep(30000);
                try
                {
                    Assert.IsTrue(Summary.LblNoData.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Knowledgebase Item Grid validated and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Knowledgebase Item 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");
                }
            }
            public void MarkAsRead_Knowledbase_Item_OrgGroupForUserWithSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Mark As Read 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 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);

                FpSummaryPage Summary = new FpSummaryPage();

                String[] Knowledgebasedetails = Summary.RetrieveKnowledgebaseGriddetails(strTDTitle);
                String   strFPwebItem         = Knowledgebasedetails[0];

                System.Threading.Thread.Sleep(15000);


                /* Validate Item for logged in user */
                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);

                /* Validate Item 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.IsNull(strFPwebItem);
                    PropertiesCollection.test.Log(Status.Pass, "Data on grid validated for other user and passed");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Data on grid validated for other user 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");
                }
            }
Esempio n. 10
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 Delete_Knowledbase_Item_UserWithoutSO31_WithoutRestriction()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("Delete 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 strTDRestrictViewing = testdataSummary_Knowledgebase[7];
                string strTDUser            = testdataSummary_Knowledgebase[11];
                string strTDOtherUser       = testdataSummary_Knowledgebase[16];
                string strTDLogin           = testdataSummary_Knowledgebase[20];


                /* Identify PeopleId for the user */

                string strSQLtblname      = "tblPeople";
                string strtblselectcolumn = "PeopleID";
                string strtblcolumn       = "Surname";
                string strwherecondn      = strTDUser;
                var    conn     = new ConnectToSQLServer();
                string PeopleID = conn.Select(strSQLtblname, strtblselectcolumn, strtblcolumn, strwherecondn);

                /* Identify PeopleId for second user */

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

                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);

                FpKnowledgeBasePage Knowledgebase = new FpKnowledgeBasePage();

                Knowledgebase.Delete_Knowledgebase_Item(strTDTitle, strTDRestrictViewing, PeopleID, PeopleIDOther);

                System.Threading.Thread.Sleep(5000);


                string KBItemXPath = null;

                KBItemXPath = "//*/div/span[contains(.,'" + strTDTitle + "')]";

                try
                {
                    Assert.IsTrue(Knowledgebase.txtKBItem.Displayed);
                    PropertiesCollection.test.Log(Status.Fail, "Knowledgebase Item could not be deleted");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Pass, "Knowledgebase Item deleted");
                }
            }
            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");
                }
            }