示例#1
0
        public static void ClickSearch()
        {
            Logger.AddClickAction("Search");

            //click search button
            GetSearchButton().Click();

            //capture the page load time
            HomePage.Data.SearchTime = NonFunctionalReq.CaptureTime(() => Driver.Instance.FindElementWithTimeout(By.CssSelector("div.row-fluid a.pull-left div.logo"), 65, "Result page is not displayed within 60 Sec"), "Search Page load time is");

            switch (HomePage.Data.SearchOption)
            {
            case SearchOption.FlightOnly:
                //Wait for java script to load
                FlightResultsPage.WaitToLoad();
                break;

            case SearchOption.HotelOnly:
                //Wait for java script to load
                HotelResultsPage.WaitToLoad();
                break;

            case SearchOption.FlightAndHotel:
                //Wait for java script to load
                FlightResultsPage.WaitToLoad();
                break;
            }
        }
示例#2
0
        public static void ClickSearchAndCapture()
        {
            Logger.AddClickAction("SearchAndCapture");

            //click search button
            GetSearchButton().Click();

            //capture the page load time
            HomePage.Data.SearchTime = NonFunctionalReq.CaptureTime(() => Driver.Instance.FindElementWithTimeout(By.Id("filtersDialog"), 60, "Result page is not displayed within 60 Sec"), "Search Page load time is");

            switch (HomePage.Data.SearchOption)
            {
            case SearchOption.FlightOnly:
                //Wait for java script to load
                FlightResultsPage.WaitToLoad();

                //capture screenshot
                //NonFunctionalReq.GetScreenShot("Hotel Booking Summary Page");
                break;

            case SearchOption.HotelOnly:
                //Wait for java script to load
                HotelResultsPage.WaitToLoad();

                //capture screenshot
                //NonFunctionalReq.GetScreenShot("Hotel Booking Summary Page");
                break;

            case SearchOption.FlightAndHotel:
                //Wait for java script to load
                FlightResultsPage.WaitToLoad();

                //capture screenshot
                //NonFunctionalReq.GetScreenShot("Hotel Booking Summary Page");
                break;
            }
        }