Пример #1
0
        internal void ManageListingsDeleteListingSteps()
        {
            //Click on Manage Listings button
            ManageListingsbutton.Click();
            Thread.Sleep(1500);
            //Populate the Excel sheet
            Global.GlobalDefinitions.ExcelLib.PopulateInCollection(Global.Base.ExcelPath, "ShareSkill");
            int                 excelRowToRead = 2;
            IWebElement         listingTable   = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/table"));
            IList <IWebElement> tableRows      = listingTable.FindElements(By.TagName("tr"));

            IWebElement rowToDelete = DeleteButton;

            for (int i = 0; i < tableRows.Count; i++)
            {
                IWebElement row = tableRows[i];
                if (row.Text.Contains(Global.GlobalDefinitions.ExcelLib.ReadData(excelRowToRead, "Title")) && row.Text.Contains(Global.GlobalDefinitions.ExcelLib.ReadData(excelRowToRead, "Description")))
                {
                    rowToDelete = row;
                    break;
                }
            }
            IWebElement DeleteB = rowToDelete.FindElement(By.XPath("//i[contains(@class, 'remove icon')]"));

            //Click on the Delete icon button
            DeleteB.Click();
            //Confirm delete
            DeleteConfirmButton.Click();
            Thread.Sleep(1500);

            //Verify
            IList <IWebElement> tableRowsAfterDelete = listingTable.FindElements(By.TagName("tr"));
            Boolean             isListingPresent     = false;

            for (int i = 0; i < tableRowsAfterDelete.Count; i++)
            {
                IWebElement row = tableRowsAfterDelete[i];
                if (row.Text.Contains(Global.GlobalDefinitions.ExcelLib.ReadData(excelRowToRead, "Title")) && row.Text.Contains(Global.GlobalDefinitions.ExcelLib.ReadData(excelRowToRead, "Description")))
                {
                    isListingPresent = true;
                    break;
                }
            }
            if (isListingPresent == false)
            {
                Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Delete Skill test Successful");
            }
            else
            {
                Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Delete Skill test Failed");
            }
        }
Пример #2
0
        internal void ManageListingsEditListingSteps()
        {
            //Click on Manage Listings button
            ManageListingsbutton.Click();
            Thread.Sleep(1500);

            //Click on Manage Listings edit button
            EditButton.Click();
            Thread.Sleep(1500);
            ShareSkill ShareSkillPage = new ShareSkill();

            ShareSkillPage.EditSkillSteps();
        }
Пример #3
0
        internal void ManageListingsViewDetailsSteps()
        {
            //Click on Manage Listings button
            ManageListingsbutton.Click();
            Thread.Sleep(1500);
            //Click on the Eye icon button
            EyeIconButton.Click();
            Thread.Sleep(1500);

            //Verify
            if (ServiceDetailPage != null)
            {
                Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "View Details Successful");
            }
            else
            {
                Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "View Details Unsuccessful");
            }
        }