//This method deletes ManageLIsting fom ManageListings table

        public void DeleteManageListing()
        {
            ExcelLibrary.PopulateInCollectiion(ConstantHelpers.TestDataPath, "ManageListingsSheet");
            Driver.WaitForElement(20, By.XPath("//tbody/tr[1]/td[3]"));
            String titleManageListing = Driver.driver.FindElement(By.XPath("//tbody/tr[1]/td[3]")).Text;

            if ((ExcelLibrary.ReadData(2, "Delete Action")) == "Yes")
            {
                if ((titleManageListing == "Seleinium with Csharp") || (titleManageListing == "Seleinium with Java"))
                // if (titleManageListing == "Java")
                {
                    btnDelete.Click();
                    Thread.Sleep(1000);
                    String deleteText    = Driver.driver.FindElement(By.XPath("/html/body/div[2]/div/div[2]/p[1]")).Text;
                    String deleteByTitle = Driver.driver.FindElement(By.XPath("/html/body/div[2]/div/div[2]/p[2]")).Text;
                    if ((deleteText == "Are you sure you want to delete this service?") && (deleteByTitle == titleManageListing))
                    {
                        //click on 'Yes' to delete ManageListing
                        Driver.driver.FindElement(By.XPath("//div[@class='actions']/button[2]")).Click();
                    }
                    else
                    {
                        //click on 'No' to cancel delete ManageListing
                        Driver.driver.FindElement(By.XPath("//div[@class='actions']/button[1]")).Click();
                    }
                }
            }
        }
        //EditButton

        //This method Edits ManageListing from ManageListings table
        public void EditManageListings()
        {
            ExcelLibrary.PopulateInCollectiion(ConstantHelpers.TestDataPath, "ManageListingsSheet");
            if ((ExcelLibrary.ReadData(2, "Edit Action")) == "Yes")
            {
                Driver.WaitForElement(60, By.XPath("//tbody/tr[1]/td[3]"));
                String titleManageListing = Driver.driver.FindElement(By.XPath("//tbody/tr[1]/td[3]")).Text;
                if (titleManageListing == "Seleinium with Csharp")
                {
                    btnEdit.Click();
                    ShareSkillPage skillPage = new ShareSkillPage();
                    skillPage.ReadExcelEditShareSkill();
                    skillPage.AddShareSkill();
                }
            }
        }
        // Login method performs login operation with valid credentials
        public void LogIn()
        {
            //populating data from excel sheet into datacollectiion
            ExcelLibrary.PopulateInCollectiion(ConstantHelpers.TestDataPath, "LogInSheet");

            //String result = ExcelLibrary.ReadData(1, "Email");
            Driver.WaitForElement(30, By.XPath("//*[@id='home']/div/div/div[1]/div/a"));

            //user clicks on SignIn button
            btnSignIn.Click();

            //user enters valid username
            txtEmailAddress.SendKeys(ExcelLibrary.ReadData(2, "Email"));


            //user enters valid password
            txtPassword.SendKeys(ExcelLibrary.ReadData(2, "Password"));

            //user clicks on login button
            btnLogin.Click();
        }
 public void ReadExcelEditShareSkill()
 {
     //populating data from excel sheet
     ExcelLibrary.PopulateInCollectiion(ConstantHelpers.TestDataPath, "EditShareSkillSheet");
 }