Esempio n. 1
0
        public void Sync()
        {
            webPagesService.Load(webDriver, CommonConstants.FEED_URL, CommonConstants.WAIT_FOR_SCROLL_CONTAINER);
            webPagesService.ScrollToBottom(webDriver);

            ICollection <MatchFeedModel> processedFeed = new List <MatchFeedModel>();
            IEnumerable <string>         urls          = htmlService.GetMatchUrls(MatchXPaths.EVENT_BODY, webDriver.PageSource);

            foreach (var url in urls)
            {
                bool isLoaded = webPagesService.Load(webDriver, url, CommonConstants.WAIT_FOR_MATCH_CONTAINER);

                if (isLoaded)
                {
                    HtmlNode       matchContainer = htmlService.GetMatchContainer(ContainerXPaths.MATCH, webDriver.PageSource);
                    MatchFeedModel feedModel      = matchesProvider.Get(matchContainer);
                    feedManager.Manage(feedModel);

                    processedFeed.Add(feedModel);
                }
            }

            unprocessedFeedManager.Manage(processedFeed);
        }
Esempio n. 2
0
        public void ScrollToBottomShouldHasAtleastOneHandledWindows()
        {
            webPagesService.ScrollToBottom(webDriver);

            Assert.IsTrue(webDriver.WindowHandles.Any());
        }