Пример #1
0
        public void ShouldBook_5th_MostPopularFlight_Palma_De_Mallorca()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().FlightOnly().ToDestination("Palma De Mallorca, Mallorca").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("London Heathrow, London, United Kingdom (LHR)")
            .ForAdults(2).WithChildren(2).OfAges(2, 4).Search();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), Is.True, "No Results are available for the flight search");

            //Select first room option of the first hotel displayed on the very first result page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).Continue();

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

            //Click Booknow button
            ExtrasPage.BookFlight().Continue();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment page is not displayed");
        }
Пример #2
0
        public void ShouldBook_1st_MostPopularFlightAndHotel_Benidorm()
        {
            //Select the uk location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            //Enter Hotel only search data
            HomePage.SearchFor().FlightAndHotel().ToDestination("Benidorm, Spain").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport(HomePageRnd.PickRandomFlightDepartureAirport()).SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the flight search.");

            //Select Room 1 of a random hotel from the first result page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).ContinueAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(HotelResultsPage.AreResultsDisplayed(), "No Results are available for the hotel search");

            //Select random hotel from the first result page
            HotelResultsPage.ClickHotelNumber(HotelResultsPageRnd.PickRandomHotel());

            //Check HotelDetailPage is displayed
            Assert.That(HotelDetailPage.IsDisplayed(), "Hotel Detail page is not displayed");

            //Select the first available room from the list
            HotelDetailPage.SelectRoom().OnlyOneRoomWithAvailableRoom(1).ContinueAndCapture();

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

            //check if Airport Transfer is displayed
            Assert.That(ExtrasPage.IsExtraDisplayed(Extras.Travelinsurance), "TravelInsurrance is not Visible on extra page");

            //Expand Car Hire
            ExtrasPage.ExpandExtraLink(Extras.Travelinsurance);

            //Confirm if any results are available
            Assert.That(ExtrasPage.AreResultsDisplayed(Extras.Travelinsurance), "TravelInsurrance results not available");

            //Pick a random option from travel insurrance
            ExtrasPage.PickRandomTravelInsurance();

            //Add Airporttranser and click Booknow button
            ExtrasPage.BookFlightAndHotel().ContinueAndCapture();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Пример #3
0
        public void ShouldBook_2nd_MostPopularFlightAndHotel_Tenerife()
        {
            //Select the uk location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            //Enter Hotel only search data
            HomePage.SearchFor().FlightAndHotel().ToDestination("Tenerife, Canaries").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport(HomePageRnd.PickRandomFlightDepartureAirport()).SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the flight search.");

            //Select Room 1 of a random hotel from the first result page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).ContinueAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(HotelResultsPage.AreResultsDisplayed(), "No Results are available for the hotel search");

            //Select random hotel from the first result page
            HotelResultsPage.ClickHotelNumber(HotelResultsPageRnd.PickRandomHotel());

            //Check HotelDetailPage is displayed
            Assert.That(HotelDetailPage.IsDisplayed(), "Hotel Detail page is not displayed");

            //Select the first available room from the list
            HotelDetailPage.SelectRoom().OnlyOneRoomWithAvailableRoom(1).ContinueAndCapture();

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

            //Click Booknow button
            ExtrasPage.BookFlightAndHotel().ContinueAndCapture();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
        public void ShouldBookFlight_For2Adults_ForDestination_Benidorm()
        {
            //Enter search criteria on home page and click search
            HomePage.SearchFor().FlightOnly().ToDestination("ALC").FromCheckIn(Calendar.PickRandomCheckInDate()).ToCheckOut(Calendar.PickRandomCheckOutDate())
            .FromDepartureAirport("Manchester Airport, Manchester, United Kingdom (MAN)").ForAdults(2).Search();

            Assert.That(FlightResultsPage.IsDisplayed(), "Flights results isn't displayed");

            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).Continue();

            Assert.That(ExtrasPage.IsDisplayed(), "Extras page isn't displayed");

            ExtrasPage.ClickBookNowAndCapture();

            Assert.That(PaymentPage.IsDisplayed(), "Payment page isn't displayed");

            PaymentPage.MakeAFlightBooking().ForAllGuestDetails().AutoFill().ForContactDetails().WithEmail("*****@*****.**").WithPhoneNumber("07747680480")
            .ForPaymentDetails().AutoFill().ForStaffDetails().AutoFill().Confirm();

            Assert.That(ConfirmationPage.IsDisplayed(), "Booking Confirmation page isn't displayed");
        }
        public void ShouldBook_2nd_MostPopularFlight_Alicante()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().FlightOnly().ToDestination("Alicante").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("London Heathrow, London, United Kingdom (LHR)").SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the flight search");

            //Select first room option of the first hotel displayed on the very first result page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).Continue();

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

            //Check if Airport Transfer is visible on extra's page
            Assert.That(ExtrasPage.IsExtraDisplayed(Extras.AirportTransfer), "AirportTransfer is not Visible on extra page");

            //Expand Airport Transfer Link
            ExtrasPage.ExpandExtraLink(Extras.AirportTransfer);

            //Confirm if any results are available
            Assert.That(ExtrasPage.AreResultsDisplayed(Extras.AirportTransfer), "AirportTransfer results not available");

            //Pick a random option from travel insurrance
            ExtrasPage.PickRandomAirportTransfer();

            //Click Booknow button
            ExtrasPage.BookFlight().ContinueAndCapture();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Пример #6
0
        public void FlightsOnlyLiveChecks_Tenerife()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().FlightOnly().ToDestination("Tenerife").FromDepartureAirport("London Heathrow, London, United Kingdom (LHR)")
            .FromCheckIn(Calendar.PickRandomCheckInDate()).ToCheckOut(Calendar.PickRandomCheckOutDate()).SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the flight search");

            //Select first room option of the first hotel displayed on the very first result page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).Continue();

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

            //Click Booknow button
            ExtrasPage.BookFlight().ContinueAndCapture();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Пример #7
0
        public void ShouldMakeFlightOnlyBooking()
        {
            //Select united kingdom as the user location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            HomePage.SearchFor().FlightOnly().ToDestination("AYT").FromCheckIn("10/10/2014")
            .ToCheckOut("17/10/2014").FromDepartureAirport("Leeds-Bradford, Leeds, United Kingdom (LBA)")
            .ForAdults(2).SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the Flight search");

            //Check if search criteria match flight search header
            //Assert.That(FlightResultsPage.ValidateSearchCriteria(), "Home Search criteria");

            //Confirm all flights depature and return dates are same as the search criteria
            //Assert.That(FlightResultsPage.ValidateResultDates(),Is.True,"Search criteria dates don’t match with the flight results");

            //Confirm all inbond outbond departure airport are correct
            //Assert.That(FlightResultsPage.ValidateResultDestinations(), "Search criteria destination don’t match with the flight results");

            //Find supplier on first result page
            //Assert.IsTrue(FlightResultsPage.ContainsFlightFromSupplier(script.TestName),"Supplier name not found in staff 'Supplier' and 'Airline' information");

            //select the first result from first page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).ContinueAndCapture();

            //check extra page is displayed
            Assert.That(ExtrasPage.IsDisplayed(), "Extras Page isn't displayed");

            //Price checks
            Assert.That(ExtrasPage.ValidatePrice(), "Difference in price comparision - Flight price on results page: {0} - Change in Price on Extra Page {1} - Orignal price on extra page: {2}",
                        FlightResultsPage.Data.Price
                        , ExtrasPage.Data.ChangedPrice
                        , ExtrasPage.Data.OrignalPrice);

            //Check total price against changed price
            if (ExtrasPage.Data.TotalPrice == 0)
            {
                ExtrasPage.Save(Information.TotalPrice);
                Assert.AreEqual(ExtrasPage.Data.ChangedPrice, ExtrasPage.Data.TotalPrice, "Difference in price comparision - Changed price on extras page: {0} - Total Price on Extras page {1}"
                                , ExtrasPage.Data.ChangedPrice
                                , ExtrasPage.Data.TotalPrice);
            }

            //save flight information
            ExtrasPage.Save(Information.Flight);

            //Compare selected flight information
            Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureTime, ExtrasPage.Data.OutboundDepartureTime, "FlightResult page Outbound DepartureTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalTime, ExtrasPage.Data.OutboundArrivalTime, "FlightResult page Outbound ArrivalTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundFlightNo, ExtrasPage.Data.OutboundFlightNo, "FlightResult page Outbound FlightNumber doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureAirport, ExtrasPage.Data.OutboundDepartureAiport, "FlightResult page Outbound DepartureAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalAirport, ExtrasPage.Data.OutboundArrivalAirport, "FlightResult page Outbound ArrivalAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundJourneyTime, ExtrasPage.Data.OutboundJourneyTime, "FlightResult page Outbound JourneyTime doesn't match with Extra Page");

            //Assert.AreEqual(FlightResultsPage.Data.OutboundJourney, ExtrasPage.Data.OutboundJourney);


            Assert.AreEqual(FlightResultsPage.Data.InboundFlightNo, ExtrasPage.Data.InboundFlightNo, "FlightResult page Inbound FlightNumber doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundDepartureTime, ExtrasPage.Data.InboundDepartureTime, "FlightResult page Inbound DepartureTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundDepartureAirport, ExtrasPage.Data.InbounddDepartureAiport, "FlightResult page Inbound DepartureAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundArrivalAirport, ExtrasPage.Data.InboundArrivalAirport, "FlightResult page Inbound ArrivalAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundArrivalTime, ExtrasPage.Data.InboundArrivalTime, "FlightResult page Inbound ArrivalTime doesn't match with Extra Page");
            //Assert.AreEqual(FlightResultsPage.Data.InboundJourney, ExtrasPage.Data.InboundJourney);
            Assert.AreEqual(FlightResultsPage.Data.InboundJourneyTime, ExtrasPage.Data.InboundJourneyTime, "FlightResult page Inbound JourneyTime doesn't match with Extra Page");

            ExtrasPage.BookFlight().Continue();

            PaymentPage.Save(Information.Flight);

            Assert.AreEqual(ExtrasPage.Data.OutboundDepartureTime, PaymentPage.Data.OutboundDepartureTime, "Extra's page Outbound DepartureTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundArrivalTime, PaymentPage.Data.OutboundArrivalTime, "Extra's page Outbound ArrivalTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundJourneyTime, PaymentPage.Data.OutboundJourneyTime, "Extra's page Outbound JourneyTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundJourney, PaymentPage.Data.OutboundJourney, "Extra's page Outbound Journey doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundAirline, PaymentPage.Data.OutboundAirline, "Extra's page Outbound Airline doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundFlightNo, PaymentPage.Data.OutboundFlightNo, "Extra's page Outbound FlightNumber doesn't match with Payment Page");



            Assert.AreEqual(ExtrasPage.Data.InboundDepartureTime, PaymentPage.Data.InboundDepartureTime, "Extra's page Inbound DepartureTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundArrivalTime, PaymentPage.Data.InboundArrivalTime, "Extra's page Inbound ArrivalTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundJourneyTime, PaymentPage.Data.InboundJourneyTime, "Extra's page Inbound JourneyTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundJourney, PaymentPage.Data.InboundJourney, "Extra's page Inbound Journey doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundAirline, PaymentPage.Data.InboundAirline, "Extra's page Inbound Airline doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundFlightNo, PaymentPage.Data.InboundFlightNo, "Extra's page Inbound FlightNumber doesn't match with Payment Page");

            PaymentPage.Save(Information.TotalPrice);

            Assert.AreEqual(ExtrasPage.Data.TotalPrice, PaymentPage.Data.TotalPrice);

            PaymentPage.MakeAFlightBooking()
            .ForGuestDetailsNumber(1).AutoFill()
            .ForGuestDetailsNumber(2).AutoFill()
            .ForContactDetails()
            .WithEmail("*****@*****.**").WithPhoneNumber("08719110030")
            .ForPaymentDetails()
            .WithPaymentType(Card.Mastercard)
            .WithCardNo("5454545454545454")
            .WithExpiryDate("10/20")
            .WithSecurityCode("123")
            .WithPostCode("S11 8NX")
            .ForStaffDetails().WithReference("test").WithCustomerPhone("Test")
            .Confirm();

            Assert.IsTrue(ConfirmationPage.IsDisplayed(), "Confirmation page isn't displayed within 60 sec");

            Assert.IsTrue(ConfirmationPage.PNRNoIsDisplayed(), "PNR Number is empty");

            ConfirmationPage.SaveItineraryNo();
            ConfirmationPage.SaveBookedByDetails();
            ConfirmationPage.SavePNRNo();
            ConfirmationPage.SaveFlightDetails();
            ConfirmationPage.SaveTotalPrice();

            Assert.AreEqual(PaymentPage.Data.TotalPriceWithCardFees, ConfirmationPage.Data.TotalPrice, "Total Price with Card Fee don't match with total price on booking page");

            AdminPanelPage.Navigate(AdminPanelEnviorment.Test);

            Assert.IsTrue(AdminPanelPage.IsDisplayed(), "AdminPanel Page isn't displayed");

            AdminPanelPage.SearchBookingByRefrence(ConfirmationPage.Data.ItineraryNo);

            Assert.IsTrue(AdminPanelPage.IsBookingFound(), "Booking is not found on admin panel");

            Assert.IsTrue(AdminPanelPage.IsBookingValid(ConfirmationPage.Data.ItineraryNo), "Itinerary number of the booking found donot match with the itinerary number provided");

            AdminPanelPage.SaveBookingDetails();

            //ConfirmationPage
            //HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            ////check if landing page is displayed
            //Assert.That(HomePage.IsDisplayed, "Home Page isn't displayed");

            ////check if landing page is displayed
            ////Assert.That(HomePage.IsDisplayed, "Home Page isn't displayed");
            ////HotelResultsPage.SelectRoom().ByHotel("Hilton").OnlyOneRoomWithAvailableRoom(1).Continue();

            ////Enter flight only search data
            //HomePage.SearchFor().FlightOnly().ToDestination("AYT").FromCheckIn(Calendar.PickRandomCheckInDate())
            //    .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("London Gatwick, London, United Kingdom (LGW)")
            //    .ForAdults(2).SearchAndCapture();
            ////Enter flight only search data
            ///*HomePage.SearchFor().FlightOnly().ToDestination("Paris (All Airports)").FromCheckIn("23/04/2014")
            //    .ToCheckOut("30/04/2014").FromDepartureAirport("London (All Airports), London, United Kingdom (LON)")
            //    .ForAdults(2).SearchAndCapture();*/
            ///*HomePage.SearchFor().FlightOnly().ToDestination(script.Destination).FromCheckIn(HomePageRnd.PickRandomCheckInDate())
            //    .ToCheckOut(HomePageRnd.PickRandomCheckOutDate()).FromDepartureAirport(script.DepartureAirport)
            //    .ForAdults(script.Adults).SearchAndCapture();*/

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

            //FlightResultsPage.ExpandFlexible();
            //FlightResultsPage.ClickSearchDateRange(SearchDateRanges.Minus3Days);

            //FlightResultsPage.ChangeSearchPanel.ChangeSearch().FlightOnly().ToDestination("PMI").FromCheckIn(Calendar.PickRandomCheckInDate())
            //    .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("London Heathrow, London, United Kingdom (LHR)").ForAdults(3).WithChildren(2).OfAges(1, 2).ShowPricesAndCapture();

            ////Check if any hote results are displayed for the search
            //Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the Flight search");

            ////Check if search criteria match flight search header
            ////Assert.That(FlightResultsPage.ValidateSearchCriteria(), "Home Search criteria");

            ////Confirm all flights depature and return dates are same as the search criteria
            //FlightResultsPage.ValidateResultDates();

            ////Confirm all inbond outbond departure airport are correct
            //FlightResultsPage.ValidateResultDestinations();

            ////select the first result from first page
            //FlightResultsPage.SelectFlight().ByFlightNumber(1).Continue();

            ////check extra page is displayed
            //Assert.That(ExtrasPage.IsDisplayed(), "Extras Page isn't displayed");

            ////save flight information on extra's page
            //Assert.That(ExtrasPage.ValidatePrice(), "Price on flight result page and extra page doesn't match");

            ////Check total price against changed price
            //if (ExtrasPage.Data.TotalPrice == 0)
            //{
            //    ExtrasPage.SaveTotalPrice();
            //    Assert.AreEqual(ExtrasPage.Data.ChangedPrice, ExtrasPage.Data.TotalPrice, "Changed price and total price don't match");
            //}

            ////save flight information
            //ExtrasPage.Save(Information.Flight);

            ////Compare selected flight information
            //Assert.AreEqual(FlightResultsPage.Data.OutboundFlightNo, ExtrasPage.Data.OutboundFlightNo);
            //Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureTime, ExtrasPage.Data.OutboundDepartureTime);
            //Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureAirport, ExtrasPage.Data.OutboundDepartureAiport);
            //Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalAirport, ExtrasPage.Data.OutboundArrivalAirport);
            //Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalTime, ExtrasPage.Data.OutboundArrivalTime);
            ////Assert.AreEqual(FlightResultsPage.Data.OutboundJourney, ExtrasPage.Data.OutboundJourney);
            //Assert.AreEqual(FlightResultsPage.Data.OutboundJourneyTime, ExtrasPage.Data.OutboundJourneyTime);

            //Assert.AreEqual(FlightResultsPage.Data.InboundFlightNo, ExtrasPage.Data.InboundFlightNo);
            //Assert.AreEqual(FlightResultsPage.Data.InboundDepartureTime, ExtrasPage.Data.InboundDepartureTime);
            //Assert.AreEqual(FlightResultsPage.Data.InboundDepartureAirport, ExtrasPage.Data.InbounddDepartureAiport);
            //Assert.AreEqual(FlightResultsPage.Data.InboundArrivalAirport, ExtrasPage.Data.InboundArrivalAirport);
            //Assert.AreEqual(FlightResultsPage.Data.InboundArrivalTime, ExtrasPage.Data.InboundArrivalTime);
            ////Assert.AreEqual(FlightResultsPage.Data.InboundJourney, ExtrasPage.Data.InboundJourney);
            //Assert.AreEqual(FlightResultsPage.Data.InboundJourneyTime, ExtrasPage.Data.InboundJourneyTime);

            //ExtrasPage.BookFlight().Continue();

            //PaymentPage.Save(Information.Flight);

            //Assert.AreEqual(ExtrasPage.Data.OutboundFlightNo, PaymentPage.Data.OutboundFlightNo);
            //Assert.AreEqual(ExtrasPage.Data.OutboundDepartureTime, PaymentPage.Data.OutboundDepartureTime);
            //Assert.AreEqual(ExtrasPage.Data.OutboundJourney, PaymentPage.Data.OutboundJourney);

            //Assert.AreEqual(ExtrasPage.Data.InboundFlightNo, PaymentPage.Data.InboundFlightNo);
            //Assert.AreEqual(ExtrasPage.Data.InboundDepartureTime, PaymentPage.Data.InboundDepartureTime);
            //Assert.AreEqual(ExtrasPage.Data.InboundJourney, PaymentPage.Data.InboundJourney);

            //PaymentPage.Save(Information.TotalPrice);

            //Assert.AreEqual(ExtrasPage.Data.TotalPrice, PaymentPage.Data.TotalPrice);

            ////Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalAirport, ExtrasPage.Data.OutboundArrivalAirport);
            ////Assert.AreEqual(FlightResultsPage.Data.OutboundFlightArrivalTime, ExtrasPage.Data.OutboundArrivalTime);
            ////Assert.AreEqual(FlightResultsPage.Data.OutboundJourney, ExtrasPage.Data.OutboundJourney);
            ////Assert.AreEqual(FlightResultsPage.Data.OutboundJourneyTime, ExtrasPage.Data.OutboundJourneyTime);
            ////ExtrasPage.BookFlight().Continue();
            //////check if result page is displayed
            ////Assert.That(FlightResultsPage.IsDisplayed(), "Flight Search Result Page isn't displayed");
            ////Assert.That(FlightResultsPage.AreResultsDisplayed(), "Flight Search Results aren't displayed");
            ////Assert.That(FlightResultsPage.ValidateSearchCriteria(), "Validate Search Criteria with Flight Results Page Header");
            //////throw new Exception();
            //////throw new Exception();

            ////Assert.That(FlightResultsPage.ValidateResultDates(), "Search dates donot match");
            ////Assert.That(FlightResultsPage.ValidateResultDestinations(), "Search dates donot match");
            //////search for Airline
            //////Assert.That(FlightResultsPage.ContainsFlightFromAirline("Easyjet"), "EasyJet Airline is available in results");
            ////FlightResultsPage.SelectFlight().ByFlightNumber(4).ContinueAndCapture();

            ////select flight by airline
            ////FlightResultsPage.ClickFlight(FlightResultsPage.FindFlightForFirstAirline("Easyjet"));

            //////FlightResultsPage.FindFlightForFirstAirline("EasyJet")

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

            ////FlightResultsPage.SelectFlight().ByFirstSupplier("TP").Continue();
            //////FlightResultsPage.SelectFlight().ByFirstSupplier("TP").Continue();

            //////confirm if flight summary page is displayed
            ////Assert.That(ExtrasPage.IsDisplayed, "Flight summary page isn't displayed");
            ////////confirm if flight summary page is displayed
            //////Assert.That(ExtrasPage.IsDisplayed, "Flight summary page isn't displayed");

            ////ExtrasPage.CheckHoldLuggage();
            //////ExtrasPage.CheckHoldLuggage();

            ////ExtrasPage.SelectHoldLuggagePassengers(1);
            //////ExtrasPage.SelectHoldLuggagePassengers(1);

            ////ExtrasPage.CheckFlightExtraNumber(2);
            //////ExtrasPage.CheckFlightExtrasOption(2);

            ////ExtrasPage.SelectFlightExtraPassengers(2, 1);
            //////ExtrasPage.SelectFlightExtraPassengers(2, 1);

            ////ExtrasPage.ClickExtraLink(Extras.Airport_Transfer);
            //////ExtrasPage.ClickExtraLink(Extras.Airport_Transfer);
            ////ExtrasPage.SelectAirportTransferHotelLocation("Charles De Gaulle Airport");
            //////ExtrasPage.SelectAirportTransferHotelLocation("Charles De Gaulle Airport");

            ////ExtrasPage.TypeAirportTransferHotel("Kyriad Prestige Roissy");
            //////ExtrasPage.TypeAirportTransferHotel("Kyriad Prestige Roissy");

            ////ExtrasPage.ClickAirportTransterUpdate();
            //////ExtrasPage.ClickAirportTransterUpdate();

            ////ExtrasPage.CheckTransferNumber(1);
            //////ExtrasPage.CheckTransferNumber(1);

            //////ExtrasPage.ClickExtraLink(Extras.Car_Hire);

            //////ExtrasPage.SelectCarHirePickupLocation("Beauvais Airport");

            //////ExtrasPage.SelectCarHireMainDriverAge(22);

            //////ExtrasPage.SelectCarHirePickupTime("22:00");

            //////ExtrasPage.SelectCarHireDropoffTime("07:00");

            //////ExtrasPage.CheckCarHireNumber(2);

            ////ExtrasPage.ClickExtraLink(Extras.Airport_Parking);
            //////ExtrasPage.ClickExtraLink(Extras.Airport_Parking);

            ////ExtrasPage.SelectAirportParkingDropoffTime("20:00");
            //////ExtrasPage.SelectAirportParkingDropoffTime("20:00");

            ////ExtrasPage.SelectAirportParkingPickupTime("11:00");
            //////ExtrasPage.SelectAirportParkingPickupTime("11:00");

            ////ExtrasPage.ClickAirportParkingUpdate();
            //////ExtrasPage.ClickAirportParkingUpdate();

            ////ExtrasPage.CheckAirportParkingNumber(2);
            ////ExtrasPage.CheckAirportParkingNumber(2);

            ////ExtrasPage.IsVisible(Extras.Hold_luggage);
            ////ExtrasPage.Visible(Extras.Hold_luggage);
        }
Пример #8
0
        public void ShouldBookFlight_ForDestination_Benidorm()
        {
            HomePage.SearchFor().FlightOnly().ToDestination("Benidorm").FromCheckIn("01/09/2014").ToCheckOut("08/09/2014")
                .FromDepartureAirport("Manchester Airport, Manchester, United Kingdom (MAN)").ForAdults(2).Search();

            Assert.That(FlightResultsPage.IsDisplayed(), Is.True, "Flights results not displaying");

            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).Continue();
            
            Assert.That(ExtrasPage.IsDisplayed(), Is.True, "Extras page is not showing");

            ExtrasPage.Save(Information.Flight);

            Assert.That(ExtrasPage.Data.OutboundAirline == FlightResultsPage.Data.OutboundAirline, Is.True, "OutboundAirline differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.OutboundArrivalAirport == FlightResultsPage.Data.OutboundArrivalAirport, Is.True, "OutboundArrivalAirport differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.OutboundArrivalTime == FlightResultsPage.Data.OutboundArrivalTime, Is.True, "OutboundArrivalTime differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.OutboundDepartureAiport == FlightResultsPage.Data.OutboundDepartureAirport, Is.True, "OutboundDepartureAiport differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.OutboundDepartureTime == FlightResultsPage.Data.OutboundDepartureTime, Is.True, "OutboundDepartureTime differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.OutboundFlightNo == FlightResultsPage.Data.OutboundFlightNo, Is.True, "OutboundFlightNo differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InboundAirline == FlightResultsPage.Data.InboundAirline, Is.True, "InboundAirline differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InboundArrivalAirport == FlightResultsPage.Data.InboundArrivalAirport, Is.True, "InboundArrivalAirport differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InboundArrivalTime == FlightResultsPage.Data.InboundArrivalTime, Is.True, "InboundArrivalTime differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InbounddDepartureAiport == FlightResultsPage.Data.InboundDepartureAirport, Is.True, "InbounddDepartureAiport differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InboundDepartureTime == FlightResultsPage.Data.InboundDepartureTime, Is.True, "InboundDepartureTime differ from flight search results to extras");
            Assert.That(ExtrasPage.Data.InboundFlightNo == FlightResultsPage.Data.InboundFlightNo, Is.True, "InboundFlightNo differ from flight search results to extras");

            ExtrasPage.ClickBookNowAndCapture();

            Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment page is not showing");

            PaymentPage.Save(Information.Flight);

            Assert.That(PaymentPage.Data.TotalPrice == ExtrasPage.Data.TotalPrice, Is.True, "Total price differs between extras and payment");
            Assert.That(PaymentPage.Data.OutboundJourney == ExtrasPage.Data.OutboundJourney, Is.True, "Outbound Journey differs from extras to payment");
            Assert.That(PaymentPage.Data.OutboundFlightNo == ExtrasPage.Data.OutboundFlightNo, Is.True, "Outbound flight number differs from extras to payment");
            Assert.That(PaymentPage.Data.OutboundDepartureTime == ExtrasPage.Data.OutboundDepartureTime, Is.True, "Outbound departure time differs from extras to payment");
            Assert.That(PaymentPage.Data.InboundJourney == ExtrasPage.Data.InboundJourney, Is.True, "Inbound Journey differs from extras to payment");
            Assert.That(PaymentPage.Data.OutboundFlightNo == ExtrasPage.Data.InboundFlightNo, Is.True, "Inbound flight number differs from extras to payment");
            Assert.That(PaymentPage.Data.OutboundDepartureTime == ExtrasPage.Data.InboundDepartureTime, Is.True, "Inbound departure time differs from extras to payment");

            PaymentPage.SelectGuestTitle(1, Title.Mr);
            PaymentPage.TypeGuestFirstName(1, "Test");
            PaymentPage.TypeGuestLastName(1, "Test");
            PaymentPage.SelectGuestDoB(1, "01/01/1985");
            PaymentPage.SelectGuestTitle(1, Title.Mr);
            PaymentPage.TypeGuestFirstName(1, "Test");
            PaymentPage.TypeGuestLastName(1, "Test");
            PaymentPage.SelectGuestDoB(1, "01/02/1985");

            PaymentPage.TypeContactFirstName("Test");
            PaymentPage.TypeContactLastName("Test");
            PaymentPage.TypeContactEmail("*****@*****.**");
            PaymentPage.TypeContactNumber("08719110030");

            PaymentPage.SelectPaymentType(Card.Mastercard);
            PaymentPage.TypeCardHolderName("Test Test");
            PaymentPage.TypeCardNumber("5569510003306537");
            PaymentPage.TypeExpiryDate("03/15");
            PaymentPage.TypeSecurityCode("123");
            PaymentPage.TypePostCode("S11 8NX");

            PaymentPage.TypeStaffReference("smw test");
            PaymentPage.TypeStaffCustomerPhone("1");

            PaymentPage.ClickConfirmAndCapture();


        }
Пример #9
0
        public void ShouldSearch_MostPopularRoutes_ForAllMultiCom_Suppliers(TestScript script)
        {
            //Select united kingdom as the user location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            HomePage.SearchFor().FlightOnly().ToDestination(script.Destination).FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport(script.DepartureAirport)
            .ForAdults(script.Adults).SearchAndCapture();

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

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), Is.True, "No Results are available for the Flight search");

            //Check if search criteria match flight search header
            //Assert.That(FlightResultsPage.ValidateSearchCriteria(), Is.True, "Home Search criteria");

            //Confirm all flights depature and return dates are same as the search criteria
            //Assert.That(FlightResultsPage.ValidateResultDates(),Is.True,"Search criteria dates don’t match with the flight results");

            //Confirm all inbond outbond departure airport are correct
            //Assert.That(FlightResultsPage.ValidateResultDestinations(), Is.True, "Search criteria destination don’t match with the flight results");

            //Find supplier on first result page
            //Assert.IsTrue(FlightResultsPage.ContainsFlightFromSupplier(script.TestName),"Supplier name not found in staff 'Supplier' and 'Airline' information");

            //select the first result from first page
            FlightResultsPage.SelectFlight().ByFlightNumber(FlightResultsPageRnd.PickRandomFlight()).ContinueAndCapture();

            //check extra page is displayed
            Assert.That(ExtrasPage.IsDisplayed(), Is.True, "Extras Page isn't displayed");

            //Price checks
            Assert.That(ExtrasPage.ValidatePrice(), Is.True, "Difference in price comparision - Flight price on results page: {0} - Change in Price on Extra Page {1} - Orignal price on extra page: {2}",
                        FlightResultsPage.Data.Price
                        , ExtrasPage.Data.ChangedPrice
                        , ExtrasPage.Data.OrignalPrice);

            //Check total price against changed price
            if (ExtrasPage.Data.TotalPrice == 0)
            {
                ExtrasPage.Save(Information.TotalPrice);
                Assert.AreEqual(ExtrasPage.Data.ChangedPrice, ExtrasPage.Data.TotalPrice, "Difference in price comparision - Changed price on extras page: {0} - Total Price on Extras page {1}"
                                , ExtrasPage.Data.ChangedPrice
                                , ExtrasPage.Data.TotalPrice);
            }

            //save flight information
            ExtrasPage.Save(Information.Flight);

            //Compare selected flight information
            Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureTime, ExtrasPage.Data.OutboundDepartureTime, "FlightResult page Outbound DepartureTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalTime, ExtrasPage.Data.OutboundArrivalTime, "FlightResult page Outbound ArrivalTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundFlightNo, ExtrasPage.Data.OutboundFlightNo, "FlightResult page Outbound FlightNumber doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundDepartureAirport, ExtrasPage.Data.OutboundDepartureAiport, "FlightResult page Outbound DepartureAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundArrivalAirport, ExtrasPage.Data.OutboundArrivalAirport, "FlightResult page Outbound ArrivalAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.OutboundJourneyTime, ExtrasPage.Data.OutboundJourneyTime, "FlightResult page Outbound JourneyTime doesn't match with Extra Page");

            //Assert.AreEqual(FlightResultsPage.Data.OutboundJourney, ExtrasPage.Data.OutboundJourney);


            Assert.AreEqual(FlightResultsPage.Data.InboundFlightNo, ExtrasPage.Data.InboundFlightNo, "FlightResult page Inbound FlightNumber doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundDepartureTime, ExtrasPage.Data.InboundDepartureTime, "FlightResult page Inbound DepartureTime doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundDepartureAirport, ExtrasPage.Data.InbounddDepartureAiport, "FlightResult page Inbound DepartureAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundArrivalAirport, ExtrasPage.Data.InboundArrivalAirport, "FlightResult page Inbound ArrivalAirport doesn't match with Extra Page");
            Assert.AreEqual(FlightResultsPage.Data.InboundArrivalTime, ExtrasPage.Data.InboundArrivalTime, "FlightResult page Inbound ArrivalTime doesn't match with Extra Page");
            //Assert.AreEqual(FlightResultsPage.Data.InboundJourney, ExtrasPage.Data.InboundJourney);
            Assert.AreEqual(FlightResultsPage.Data.InboundJourneyTime, ExtrasPage.Data.InboundJourneyTime, "FlightResult page Inbound JourneyTime doesn't match with Extra Page");

            ExtrasPage.BookFlight().Continue();

            PaymentPage.Save(Information.Flight);

            Assert.AreEqual(ExtrasPage.Data.OutboundDepartureTime, PaymentPage.Data.OutboundDepartureTime, "Extra's page Outbound DepartureTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundArrivalTime, PaymentPage.Data.OutboundArrivalTime, "Extra's page Outbound ArrivalTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundJourneyTime, PaymentPage.Data.OutboundJourneyTime, "Extra's page Outbound JourneyTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundJourney, PaymentPage.Data.OutboundJourney, "Extra's page Outbound Journey doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundAirline, PaymentPage.Data.OutboundAirline, "Extra's page Outbound Airline doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.OutboundFlightNo, PaymentPage.Data.OutboundFlightNo, "Extra's page Outbound FlightNumber doesn't match with Payment Page");



            Assert.AreEqual(ExtrasPage.Data.InboundDepartureTime, PaymentPage.Data.InboundDepartureTime, "Extra's page Inbound DepartureTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundArrivalTime, PaymentPage.Data.InboundArrivalTime, "Extra's page Inbound ArrivalTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundJourneyTime, PaymentPage.Data.InboundJourneyTime, "Extra's page Inbound JourneyTime doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundJourney, PaymentPage.Data.InboundJourney, "Extra's page Inbound Journey doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundAirline, PaymentPage.Data.InboundAirline, "Extra's page Inbound Airline doesn't match with Payment Page");
            Assert.AreEqual(ExtrasPage.Data.InboundFlightNo, PaymentPage.Data.InboundFlightNo, "Extra's page Inbound FlightNumber doesn't match with Payment Page");

            PaymentPage.Save(Information.TotalPrice);

            Assert.AreEqual(ExtrasPage.Data.TotalPrice, PaymentPage.Data.TotalPrice);

            PaymentPage.MakeAFlightBooking()
            .ForGuestDetailsNumber(1).AutoFill()
            .ForGuestDetailsNumber(2).AutoFill()
            .ForContactDetails()
            .WithEmail("*****@*****.**").WithPhoneNumber("08719110030")
            .ForPaymentDetails()
            .WithPaymentType(Card.Mastercard)
            .WithCardHolderName("Test")
            .WithCardNo("5454545454545454")
            .WithExpiryDate("10/20")
            .WithSecurityCode("123")
            .WithPostCode("S11 8NX")
            .ForStaffDetails().WithReference("test").WithCustomerPhone("Test")
            .Confirm();

            Assert.IsTrue(ConfirmationPage.IsDisplayed(), "Confirmation page isn't displayed within 60 sec");

            Assert.IsTrue(ConfirmationPage.PNRNoIsDisplayed(), "PNR Number is empty");

            Assert.Pass(script.TestName + " Sucessful");
        }