public void SearchbyFilters() { //Read data from Excel file ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills"); string searchSkill = ExcelLib.ReadData(3, "SearchSkills"); string username_Onsite = ExcelLib.ReadData(3, "User"); string title_Onsite = ExcelLib.ReadData(3, "Title"); string username_Online = ExcelLib.ReadData(4, "User"); string title_Online = ExcelLib.ReadData(4, "Title"); //Search by skillname var searchSkillsObj = new SearchSkills(); searchSkillsObj.ClickSearch(); searchSkillsObj.InputSearchSkills(searchSkill); //filter by Online searchSkillsObj.FilterbyOnline(); Assert.IsTrue(searchSkillsObj.ValidateResults(username_Online, title_Online), "Filtered by Online failed"); //filter by Onsite searchSkillsObj.FilterbyOnsite(); Assert.IsTrue(searchSkillsObj.ValidateResults(username_Onsite, title_Onsite), "Filtered by Onsite failed"); //filter by showall searchSkillsObj.FilterbyShowAll(); Assert.IsTrue(searchSkillsObj.ValidateTitle(searchSkill), "Filtered by ShowAll failed"); }
public void SearchbyCategory() { //Read data from Excel file ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills"); string category = ExcelLib.ReadData(2, "Category"); string subcategory = ExcelLib.ReadData(2, "SubCategory"); //Search by category and subcategory var searchSkillsObj = new SearchSkills(); searchSkillsObj.ClickSearch(); searchSkillsObj.ClickCategory(category, subcategory); //Validate the result in ServiceDetails Page for (int i = 0; i < searchSkillsObj.ServiceDetailsLinks.Count(); i++) { Actions builder = new Actions(Driver); builder.KeyDown(Keys.Shift).Click(searchSkillsObj.ServiceDetailsLinks[i]).KeyUp(Keys.Shift).Build().Perform(); var serviceDetailsObj = new ServiceDetails(); var windowList = Driver.WindowHandles; Driver.SwitchTo().Window(windowList[1]); Thread.Sleep(2000); Assert.Multiple(() => { Assert.AreEqual(category, serviceDetailsObj.Category.Text); Assert.AreEqual(subcategory, serviceDetailsObj.SubCategory.Text); }); Assert.AreEqual("Online", serviceDetailsObj.LocationType.Text); Driver.Close(); Driver.SwitchTo().Window(windowList[0]); } }
public void SearchbyFiltersOnSite() { //Read data from Excel file ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills"); string searchSkill = ExcelLib.ReadData(3, "SearchSkills"); //Search by skill first var searchSkillsObj = new SearchSkills(); searchSkillsObj.ClickSearch(); searchSkillsObj.InputSearchSkills(searchSkill); //Filter by Onsite searchSkillsObj.FilterbyOnsite(); //Validate the result in ServiceDetails Pag for (int i = 0; i < searchSkillsObj.ServiceDetailsLinks.Count(); i++) { Actions builder = new Actions(Driver); builder.KeyDown(Keys.Shift).Click(searchSkillsObj.ServiceDetailsLinks[i]).KeyUp(Keys.Shift).Build().Perform(); var serviceDetailsObj = new ServiceDetails(); var windowList = Driver.WindowHandles; Driver.SwitchTo().Window(windowList[1]); Thread.Sleep(2000); Assert.AreEqual("On-Site", serviceDetailsObj.LocationType.Text, "Filter by Onsite failed"); Driver.Close(); Driver.SwitchTo().Window(windowList[0]); } }
public void GivenIClickSearchIconOnProfilePage() { //Search by category and subcategory var searchSkillsObj = new SearchSkills(); _scenarioContext["searchSkillsObj"] = searchSkillsObj; searchSkillsObj.ClickSearch(); }
public void SearchSkillsByCategoriesTest() { test = extent.StartTest("Search Skills By Categories"); SearchSkills searchSkills = new SearchSkills(); searchSkills.SearchSkillsByCategories(driver); searchSkills.VerifySearchSkillsByCategories(driver); }
public void SearchSkillsByFiltersTest() { test = extent.StartTest("Search Skills By Filters"); SearchSkills searchSkills = new SearchSkills(); searchSkills.SearchSkillsByFilters(driver); searchSkills.VerifySearchSkillsByFilters(driver); }
public void SearchSkills() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("SearchSkills"); //Create a Class & an Object to call the ManageRequests method SearchSkills SS = new SearchSkills(); SS.ClickOnSearchSkills(); SS.ClickOnCatagories(); SS.ClickOnSubCatagories(); }
public void SrchSkill() { //Start Report test = extent.StartTest("Search Skill"); SearchSkills create = new SearchSkills(); create.SkillSearch_By_AllCategories(); // create.SkillSearch_By_SubCateogory(); // create.Validation_Search_By_Filter(); // create.Search_By_Filter(); }
public void CategorySearchSkills() { // Log in first LogIn(); // Create a toggle for the given test, adds all log events under it test = extent.StartTest("Search Skills by categores and subcategories"); // SearchSkills object SearchSkills obj = new SearchSkills(); obj.CategorySearchSkills(); }
public void FilterSearchSkills() { // Log in first LogIn(); // Create a toggle for the given test, adds all log events under it test = extent.StartTest("Search Skills by filters"); // SearchSkills object SearchSkills obj = new SearchSkills(); obj.FilterSearchSkills(); }
public void SearchSkillByInput() { SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to Enter Skill in Search box SearchSkills.EnterText(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //check if search for particular input SearchSkills.CheckSearchSkills(2); }
public void SearchSkillBySubcategory() { SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to click on Category and Sub category respectively SearchSkills.ClickOnCategory(3); //Check if user is at right page SearchSkills.CheckSubCategory(); }
public void LastPageNavi() { SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to click on Show All Button SearchSkills.ClickOnShowAll(); //Check if user is at Last Page SearchSkills.CheckLastPage(); }
public void FilterByOnline() { SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to click on Online filter SearchSkills.ClickOnOnline(); //Check if user is at right page SearchSkills.CheckClickOnOnline(); }
public void SearchSkillByUsername() { SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to input username SearchSkills.EnterUserName(5); //Check if user is able to find all record of user SearchSkills.CheckSkillByUsername(5); }
public void GivenTheUserFindAnInterestingSkill() { //LogIn SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to input username SearchSkills.EnterUserName(4); //Check if user can open a Skill Box SearchSkills.ClickOnOnFirstBox(); }
public void SearchbyFiltersShowAll() { //Read data from Excel file ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills"); string searchSkill = ExcelLib.ReadData(3, "SearchSkills"); //Search by skill first var searchSkillsObj = new SearchSkills(); searchSkillsObj.ClickSearch(); searchSkillsObj.InputSearchSkills(searchSkill); //Filter by showall searchSkillsObj.FilterbyShowAll(); Assert.IsTrue(searchSkillsObj.ValidateTitle(searchSkill)); }
public void SearchSkillOperation() { // Start Report test = extent.StartTest("SearchSkillOperation"); //Creating an Instance of Search Skill Page SearchSkills find = new SearchSkills(); //Find SkillSearch_By_All_Categories find.SkillSearch_By_AllCategories(); //(working properly) //Find SkillSearch_By_Sub_Categories find.SkillSearch_By_SubCateogory(); //(Working Properly) //Find SkillSearch_By_Filters find.Search_By_Filter(); //(Working Properly) //Validate Search By Filters find.Validation_Search_By_Filter(); //(Working Properly) }
public void SearchbyCategory() { //Read data from Excel file ExcelLib.PopulateInCollection(ExcelPath, "SearchSkills"); string searchSkill = ExcelLib.ReadData(2, "SearchSkills"); string category = ExcelLib.ReadData(2, "Category"); string subcategory = ExcelLib.ReadData(2, "SubCategory"); string username = ExcelLib.ReadData(2, "User"); string title = ExcelLib.ReadData(2, "Title"); //Search by category and skillname var searchSkillsObj = new SearchSkills(); searchSkillsObj.ClickSearch(); searchSkillsObj.ClickCategory(category, subcategory); searchSkillsObj.InputSearchSkills(searchSkill); //Validate the result //The expected result should have title and username as expected Assert.IsTrue(searchSkillsObj.ValidateResults(username, title), "search skills by category failed"); }
internal void SearchSharedSkill() { Extension.WaitForElementDisplayed(Driver, By.CssSelector("input[placeholder='Search skills']"), 2); //Enter the title in search skill field and press enter SearchSkills.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title") + "\n"); Extension.WaitForElementDisplayed(Driver, By.XPath("//b[text()='All Categories']/following-sibling::span"), 2); Thread.Sleep(2000); //Validate if All categories count is greater than 0 GlobalDefinitions.ValidateBoolean(int.Parse(AllCategoriesCount.Text) > 0, "All Categories shown"); //Validate Category and subcategory added count is greater than 0 when searched foreach (IWebElement Category in CategoriesList) { string CategoryValue = Category.Text.Replace(Category.FindElement(By.XPath("./*")).Text, "").TrimEnd(); if (CategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "Category").ToLower()) { Category.Click(); GlobalDefinitions.ValidateBoolean(int.Parse(Category.FindElement(By.XPath("span")).Text) > 0, "Category shown"); IList <IWebElement> SubCategoryList = Driver.FindElements(By.XPath("//a[@role='listitem'][@class='item subcategory']")); foreach (IWebElement SubCategory in SubCategoryList) { string SubCategoryValue = SubCategory.Text.Replace(SubCategory.FindElement(By.XPath("./*")).Text, "").TrimEnd(); if (SubCategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory").ToLower()) { SubCategory.Click(); GlobalDefinitions.ValidateBoolean(int.Parse(SubCategory.FindElement(By.XPath("span")).Text) > 0, "SubCategory Shown"); Base.Image = SaveScreenShotClass.SaveScreenshot(Driver, "Report"); break; } } break; } } }
public static void HappyPathAsLearner() { //LogIn SignIn.OpenForm(); SignIn.FillCredentials(2); //Check if user is able to click on search icon SearchSkills.ClickOnSearchButton(); //Check if user is able to input username SearchSkills.EnterUserName(4); //Check if user can open a Skill Box SearchSkills.ClickOnOnFirstBox(); //Sent a request for an already opened Skill ManageRequestPage.SentRequest(); //Go to manage request page ManageRequestPage.NavigateToSentRequest(); //The User checks the new request ManageRequestPage.CheckNewSentStatus("Pending"); }
public void ThenIShouldSeeAllRecordOfSub_Categories() { //assertion SearchSkills.CheckSubCategory(); }
public void WhenIEnterUsername() { SearchSkills.EnterUserName(5); }
public void ThenIShouldSeeAllSkillOfThatUser() { SearchSkills.CheckSkillByUsername(5); }
public void WhenIClickOnOnlineButton() { SearchSkills.ClickOnOnline(); }
public void ThenIShouldSeeAllOnlineSkills() { //Assertion SearchSkills.CheckClickOnOnline(); }
public void WhenIClickOnOnsiteButton() { SearchSkills.ClickOnOnsite(); }
public void ThenIShouldSeeAllOnsiteSkills() { SearchSkills.CheckClickOnsite(); }
public void WhenIClickOnShowAllButton() { SearchSkills.ClickOnShowAll(); }
public void ThenIShouldSeeAllSkills() { SearchSkills.CheckLastPage(); }