public void ApplyQuestionFilter() { string searchText = "restaurant"; SearchResults <string, string> getsearchresults = new SearchResults <string, string>(); List <string> entity = new List <string>(); entity.Add("14"); int count = 0; Login login = new Login(driver, LoginType.Facebook); login.SignIn(); FrilpHome home = new FrilpHome(driver); SeleniumHelper.ImplicitWait(driver, TimeSpan.FromSeconds(15)); home.Search.SendKeys(searchText); SeleniumHelper.ImplicitWait(driver, TimeSpan.FromSeconds(25)); home.SelectAutoCompleteSearch(searchText); FrilpBusiness business = new FrilpBusiness(driver); business.WaitForResults(searchText, TimeSpan.FromSeconds(20)); home.ActivityTab.Click(); FrilpActivity activity = new FrilpActivity(driver); activity.QuestionFilter.Click(); count = SeleniumHelper.ScrollWebPageGetCount(driver, By.ClassName("d_activity_list_item")); getsearchresults = activity.GetInvalidSearchResults(entity, count); Assert.IsFalse(getsearchresults.duplicateandInvalidItems.Count > 0 || getsearchresults.invalidItems.Count > 0); }
public void SearchBusinessCategory() { try { string searchText = "restaurant"; List <string> category = new List <string>(); category.Add("40"); int count = 0; Login login = new Login(driver, LoginType.Facebook); login.SignIn(); FrilpHome home = new FrilpHome(driver); SeleniumHelper.ImplicitWait(driver, TimeSpan.FromSeconds(15)); home.Search.SendKeys(searchText); SeleniumHelper.ImplicitWait(driver, TimeSpan.FromSeconds(25)); home.SelectAutoCompleteSearch(searchText); FrilpBusiness business = new FrilpBusiness(driver); business.WaitForResults(searchText, TimeSpan.FromSeconds(15)); count = SeleniumHelper.ScrollWebPageGetCount(driver, By.ClassName("business-name")); var getsearchResults = business.GetInvalidSearchResults(category, count); Assert.IsFalse(getsearchResults.duplicateandInvalidItems.Count > 0 || getsearchResults.invalidItems.Count > 0); } catch (WebDriverTimeoutException ex) { Assert.Fail(ex.Message); } catch (NoSuchElementException ex) { Assert.Fail(ex.Message); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void HomeandEssentialServicesTest() { try { Login login = new Login(driver, LoginType.Facebook); login.SignIn(); FrilpHome home = new FrilpHome(driver); FrilpBusiness business = new FrilpBusiness(driver); List <string> category = new List <string>(new string[] { "66", "15", "184", "96", "357", "67", "59", "63", "190", "546", "96", "109", "186", "10", "57", "105", "102", "95", "92", "9", "15", "93", "103", "11" }); int count = 0; SeleniumHelper.ImplicitWait(driver, TimeSpan.FromSeconds(15)); FrilpLeftNavigation leftnav = new FrilpLeftNavigation(driver); leftnav.HomeandEssentialServices.Click(); business.WaitForResults("Home & Essential services", TimeSpan.FromSeconds(25)); count = SeleniumHelper.ScrollWebPageGetCount(driver, By.ClassName("business-name")); var getsearchResults = business.GetInvalidSearchResults(category, count); Assert.IsFalse(getsearchResults.duplicateandInvalidItems.Count > 0 || getsearchResults.invalidItems.Count > 0); } catch (WebDriverTimeoutException ex) { Assert.Fail(ex.Message); } catch (NoSuchElementException ex) { Assert.Fail(ex.Message); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void AskQuestion() { try { string questiontext = "Looking for a Chinese Restaurant"; string category = "restaurant"; string location = "Adyar"; string user = "******"; Login login = new Login(driver, LoginType.Facebook); login.SignIn(); FrilpHome home = new FrilpHome(driver); home.ActivityTab.Click(); FrilpActivity activity = new FrilpActivity(driver); activity.QuestionFilter.Click(); SeleniumHelper.ExplicitWait(driver, By.XPath("//div[@class='nav-top']//li[@id='link_ask']"), TimeSpan.FromSeconds(25)); home.AskQuestion.Click(); //driver.FindElement(By.XPath("//div[@class='nav-top']//li[@id='link_ask']")).Click(); FrilpAskQuestion postquestion = new FrilpAskQuestion(driver); postquestion.MessageBox.SendKeys(questiontext); postquestion.Category.SendKeys(category); postquestion.SelectCategory(category); postquestion.Location.SendKeys(location); postquestion.SelectLocation(location); postquestion.TagUser.SendKeys(user); postquestion.SelectUser(user); postquestion.AskButton.Click(); postquestion.OkButton.Click(); Assert.IsTrue(postquestion.WaitForPublishedQuestion(questiontext)); } catch (WebDriverTimeoutException ex) { Assert.Fail(ex.Message); } catch (NoSuchElementException ex) { Assert.Fail(ex.Message); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public static void GotoHome(IWebDriver driver) { FrilpHome home = new FrilpHome(driver); home.HomeButton.SendKeys(Keys.Home); }
public void SignOut() { FrilpHome home = new FrilpHome(driver); home.SignOut(); }