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 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);
        }
Пример #3
0
 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);
     }
 }