internal void EditManageListings()
        {
            manageListingsLink.Clicks();
            Thread.Sleep(3000);
            GlobalDefinitions.driver.FindElement(By.XPath("(//button[contains(@role,'button')])[2]")).Clicks();
            Thread.Sleep(3000);
            GlobalDefinitions.driver.FindElement(By.XPath("(//i[contains(@class,'outline write icon')])[1]")).Clicks();
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill");

            //Read data from excel
            string Title       = GlobalDefinitions.ExcelLib.ReadData(2, "Title");
            string desc        = GlobalDefinitions.ExcelLib.ReadData(2, "Description");
            string cat         = GlobalDefinitions.ExcelLib.ReadData(2, "Category");
            string subCat      = GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory");
            string tag         = GlobalDefinitions.ExcelLib.ReadData(2, "Tags");
            string location    = GlobalDefinitions.ExcelLib.ReadData(2, "LocationType");
            string ServiceType = GlobalDefinitions.ExcelLib.ReadData(2, "ServiceType");
            //string SDate = GlobalDefinitions.ExcelLib.ReadData(2, "Startdate");
            //string Edate = GlobalDefinitions.ExcelLib.ReadData(2, "Enddate");
            //string StartTime = GlobalDefinitions.ExcelLib.ReadData(2, "Starttime");
            //string EndTime = GlobalDefinitions.ExcelLib.ReadData(2, "Endtime");
            string Skilltrade    = GlobalDefinitions.ExcelLib.ReadData(2, "SkillTrade");
            string SkillExchange = GlobalDefinitions.ExcelLib.ReadData(2, "Skill-Exchange");
            string Credit        = GlobalDefinitions.ExcelLib.ReadData(2, "Credit");
            string Active        = GlobalDefinitions.ExcelLib.ReadData(2, "Active");

            ShareSkill es = new ShareSkill();

            es.EditShareSkill(Title, desc, cat, subCat, tag, ServiceType, location,
                              //SDate,Edate,StartTime,EndTime,
                              Skilltrade, SkillExchange, Credit, Active);
        }
        internal void EditListing()
        {//papulating the data from excelsheet
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[contains(.,'Manage Listings')]"), 10);
            manageListingsLink.Click();
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='outline write icon'])[1]"), 10);
            //click on edit button
            edit.Click();
            ShareSkill shareSkill = new ShareSkill();

            shareSkill.EditShareSkill();
        }
        internal void EditManageListings()
        {
            //Click on the Manage Listings Tab
            ManageListingsTab.Click();
            Thread.Sleep(2000);

            // Click on the Edit Icon
            EditButton.Click();
            Thread.Sleep(2000);
            ShareSkill ShareSkillPage = new ShareSkill();

            ShareSkillPage.EditShareSkill();
        }
Example #4
0
        internal void Edit()
        {
            //Click on Edit button
            edit.Click();

            //Validate the Page
            Thread.Sleep(2000);
            String myTitle1 = GlobalDefinitions.driver.Title;

            Console.WriteLine(myTitle1);
            Assert.That(myTitle1, Is.EqualTo("ServiceListing"));



            ShareSkill.EditShareSkill();
        }
Example #5
0
 internal void UpdateListing()
 {
     GlobalDefinitions.wait(2000);
     while (true)
     {
         for (int i = 1; i < 5; i++)
         {
             IWebElement ela   = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[3]"));
             String      Eleme = ela.Text;
             if (Eleme == "Java")
             {
                 Thread.Sleep(2000);
                 GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[8]/div/button[2]/i")).Click();
                 ShareSkill updte = new ShareSkill();
                 updte.EditShareSkill();
                 return;
             }
         }
         Thread.Sleep(2000);
         GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[2]/button[10]")).Click();
     }
 }