Пример #1
0
        public List <Tuple <int, string> > GetMinPriceFasterTickets(string UrlIfHFaild)
        {
            List <Tuple <int, string> > keyValues = new List <Tuple <int, string> >();

            Pages.SearchResultPage searchResultPage = new Pages.SearchResultPage(driver, UrlIfHFaild);

            while (!searchResultPage.LinkSortPriceTime.Displayed)
            {
            }
            searchResultPage.LinkSortPriceTime.Click();

            int PriceFromLink = searchResultPage.GetPriceFromLinkSortPriceTime();

            while (keyValues.Count == 0)
            {
                keyValues = searchResultPage.GetTicketPricesByTime();
            }
            return(keyValues);
        }
Пример #2
0
        public bool CheckMinPriceFasterTicket(string UrlIfHFaild)
        {
            List <Tuple <int, string> > keyValues = new List <Tuple <int, string> >();

            Pages.SearchResultPage searchResultPage = new Pages.SearchResultPage(driver, UrlIfHFaild);

            while (!searchResultPage.LinkSortPriceTime.Displayed)
            {
            }
            searchResultPage.LinkSortPriceTime.Click();

            int PriceFromLink = searchResultPage.GetPriceFromLinkSortPriceTime();

            while (keyValues.Count == 0)
            {
                keyValues = searchResultPage.GetTicketPricesByTime();
            }
            return(keyValues.OrderBy(p => p.Item2).OrderBy(p => p.Item1).Select(p => p.Item1).First() == PriceFromLink);
        }