Пример #1
0
            public void SaveNewService()
            {
                //Allocate the number of services to be saved
                int NoOfServices = 2;

                ServiceListing ServiceListingObj = new ServiceListing();

                for (int i = 0; i < NoOfServices; i++)
                {
                    // Creates a toggle for the given test, adds all log events under it
                    test = extent.StartTest("Save New Service");

                    // Open Share Skill Page
                    if (i == 0)
                    {
                        Profile profilePG = new Profile();
                        profilePG.ViewShareSkillPage();
                    }
                    else
                    {
                        ManageListing manageListingObj = new ManageListing();
                        manageListingObj.ViewShareSkillPage();
                    }

                    try
                    {
                        // Save New Service Listing

                        string ActualResult = ServiceListingObj.SaveNew(i);

                        //If Shared succesfully, the record should display in ManageListings Page
                        string ExpectedResult = "True";

                        Assert.AreEqual(ExpectedResult, ActualResult);

                        // Screenshot
                        String img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "ShareSkill_" + i);
                        test.Log(LogStatus.Info, "Share Skill Successfully_" + i + ": " + img);
                    }
                    catch (Exception e)
                    {
                        Base.test.Log(LogStatus.Error, "Error in Shared Skill Save : " + e.Message);
                    }
                }
            }
Пример #2
0
 public void WhenISaveTheSkillDetails()
 {
     ServiceListingObj = new ServiceListing();
     ServiceListingObj.SaveNew(1);
 }