// Verify navigation
        internal void VerifyNavigation_2(string titleRead)
        {
            try
            {
                ListingManagement.Click();

                Thread.Sleep(1000);
                string expectedValue = titleRead;
                string actualValue   = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(.,'" + titleRead + "')]")).Text;
                Thread.Sleep(500);
                if (expectedValue == actualValue)
                {
                    Base.test.Log(LogStatus.Pass, "Test Passed, Edited Skill in Manage Listing Successfully");
                }

                else
                {
                    Base.test.Log(LogStatus.Fail, "Test Failed");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(LogStatus.Fail, "Test Failed", e.Message);
            }
        }
Beispiel #2
0
        //Collection of all methods
        internal void ShareSkillsPage(string titleRead)
        {
            try
            {
                Base.ExtentReports();
                //Start the Reports
                Base.test = Base.extent.StartTest("Add to Listing Service Listing");
                WriteTitle(titleRead);
                WriteDescription();
                SelectCategory();
                SelectSubCategory();
                AddTag_1();
                SelectServiceType();
                SelectLocationType();
                StartingDate();
                EndingDate();
                CountDays();
                StartingTime();
                EndingTime();
                SkillsToTrade();
                AddTag_2();
                UploadFile();
                SelectStatus();
                SaveDetails();
                // Click on Listing
                ListingManagement.Click();

                Thread.Sleep(1000);
                string expectedValue = titleRead;
                string actualValue   = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(.,'" + titleRead + "')]")).Text;
                Thread.Sleep(500);
                if (expectedValue == actualValue)
                {
                    Base.test.Log(LogStatus.Pass, "Test Passed, Added a Skills to Manage Listing Successfully");
                }

                else
                {
                    Base.test.Log(LogStatus.Fail, "Test Failed");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(LogStatus.Fail, "Test Failed", e.Message);
            }
        }
 // Click on Listing
 internal void ClickManageListing()
 {
     ListingManagement.Click();
     Thread.Sleep(1000);
 }