Пример #1
0
 private void ContinueProcess(bool isCapture)
 {
     if (this.rooms.Count == 1)
     {
         if (!this.isSingleRoom)
         {
             HotelResultsPage.ClickRoomNumber(hotelNumber, this.rooms[0].RoomNumber);
         }
         if (isCapture)
         {
             HotelResultsPage.ClickAvailableRoomAndCapture(hotelNumber, this.rooms[0].AvailableRoom);
         }
         else
         {
             HotelResultsPage.ClickAvailableRoom(hotelNumber, this.rooms[0].AvailableRoom);
         }
         return;
     }
     foreach (Room room in this.rooms)
     {
         HotelResultsPage.ClickRoomNumber(hotelNumber, room.RoomNumber);
         HotelResultsPage.ClickAvailableRoom(hotelNumber, room.AvailableRoom);
     }
     if (isCapture)
     {
         HotelResultsPage.ClickContinueAndCapture();
     }
     else
     {
         HotelResultsPage.ClickContinue();
     }
 }
Пример #2
0
        public void ShouldMakeFlightAndHotelBooking()
        {
            //Enter flight only search data
            HomePage.SearchFor().FlightAndHotel().ToDestination("Tenerife (Main), Tenerife, Canaries (TFS)").FromCheckIn("20/06/2014")
            .ToCheckOut("27/07/2014").FromDepartureAirport("London Heathrow, London, United Kingdom (LHR)")
            .ForAdults(2).SearchAndCapture();

            //check if result page is displayed
            Assert.That(FlightResultsPage.IsDisplayed(), Is.True, "Flight Search Result Page isn't displayed");
            Assert.That(FlightResultsPage.AreResultsDisplayed(), Is.True, "No results are displayed");

            //Search for supplier
            //Assert.That(FlightResultsPage.ContainsFlightFromSupplier("TP"), Is.True, "Supplier not found on current select page");

            FlightResultsPage.SelectFlight().ByFlightNumber(1).ContinueAndCapture();

            //Check if result page is displayed within 60 sec
            Assert.That(HotelResultsPage.IsDisplayed(), Is.True, "Hotel Search Result Page isn't displayed within 60 sec");

            Assert.That(HotelResultsPage.AreResultsDisplayed(), Is.True, "No hotel results page are displayed");

            //check if ItalCamel supplier is available from first results page
            //Assert.That(HotelResultsPage.ContainsRoomFromSupplier("ItalCamel (6)"), Is.True, "ItalCamel supplier isn't displayed on first result page");

            //Select first room option of the first hotel displayed on the very first result page
            HotelResultsPage.ClickAvailableRoom(1, 1);

            //Check if the extra page is displayed
            Assert.That(ExtrasPage.IsDisplayed(), Is.True, "Extras page is not displayed");

            ExtrasPage.Save(Information.FlightAndHotel);

            //ExtrasPage.Confirm(Information.FlightAndHotel);

            ExtrasPage.ClickBookNow();

            Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment Page not displayed");

            PaymentPage.Save(Information.FlightAndHotel);
        }