public void EditSkill(string TitleForServcToBeEdited, int rownumber) { bool editMatchFound = false; TestCase_Name = $"Editing existing services for title {TitleForServcToBeEdited}"; test = extent.CreateTest(TestCase_Name); //Create an instance for the SignIn page SignIn JoinObj = new SignIn(driver); //Invoke the LoginSteps to verify if the user can log in with valid credentials JoinObj.LoginSteps(); //Invoke the function to validate if the user has logged in successfully and the home page is displayed JoinObj.ValidateHomePage(); //Create an instance for the HomePage HomePage listObj = new HomePage(driver); //Invoke the funtion to navigate to Manage Listings listObj.navigateToManageListings(); //Create an instance for the Listing Management page ListingManagement obj = new ListingManagement(driver, TitleForServcToBeEdited, rownumber); //Invoke the function to check if the service to be edited is available in the Manage Listings editMatchFound = obj.NavigateToEditDetails(); //Create instances for ServiceListing Page and SearchSkill Page ServiceListing editObj = new ServiceListing(driver, rownumber); SearchSkill SrchObj = new SearchSkill(driver, rownumber); //Proceed to Edit service only if the service to be edited is found if (editMatchFound) { //Invoke the function to Edit services editObj.EditServices(); //Implicit wait Wait.wait(2, driver); //Invoke the function to search for service after edit obj.SearchSkillsAfterEdit(); //Invoke the function to validate the search result SrchObj.SkillSrchResult(); //Implicit wait Wait.wait(2, driver); //Create an instance for ServiceDetail Page ServiceDetail ViewEditdDetailObj = new ServiceDetail(driver, rownumber); //Invoke the function to validate the edited details ViewEditdDetailObj.ValidateServiceDetail(); } }
//Function to add services using Share Skill feature to render services to others public void ShareSkill(int rownumber) { String Title = ServiceData.TitleData(rownumber); TestCase_Name = $"Adding services with title {Title}"; test = extent.CreateTest(TestCase_Name); //Create an instance for the SignIn page SignIn JoinObj = new SignIn(driver); //Invoke the LoginSteps to verify if the user can log in with valid credentials JoinObj.LoginSteps(); //Invoke the function to validate if the user has logged in successfully and the home page is displayed JoinObj.ValidateHomePage(); //Create an instance for the HomePage HomePage SkillObj = new HomePage(driver); //Invoke the function to navigate to Share Skill Page SkillObj.navigateToShareSkill(); //Create an instance for the ShareSkillPage ShareSkillPage Obj = new ShareSkillPage(driver, rownumber); //Invoke the function to fill the details of services rendered Obj.FillDetailsOfServiceProvided(); //Create an instance for the Listing Management page ListingManagement listObj = new ListingManagement(driver, rownumber); //Invoke the funtion to navigate to Manage Listings listObj.ManageListing(); //Invoke the funtion to view the listings listObj.ViewListings(); //Invoke the funtion to view the details of the listings listObj.NavigateToViewAddedDetails(); //Create an instance for the Service Detail page ServiceDetail ViewDetailObj = new ServiceDetail(driver, rownumber); //Invoke the funtion to validate the details of services ViewDetailObj.ValidateServiceDetail(); }