Beispiel #1
0
        public void HotelBookingTestPaths()
        {
            //Enter flight only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Tenerife (Main), Tenerife, Canaries (TFS)").FromCheckIn("20/06/2014")
            .ToCheckOut("27/07/2014").ForAdults(2).AddAnotherRoom().ForAdults(3).WithChildren(2).OfAges(1, 3).SearchAndCapture();

            //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");

            //Select first room option of the first hotel displayed on the very first result page
            HotelResultsPage.SelectRoom().ByHotelName("Iberostar Grand Hotel Mencey").ForRoomNumber(1).WithAvailableRoom(1)
            .ForRoomNumber(2).WithAvailableRoom(2).ContinueAndCapture();

            //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);
        }
Beispiel #2
0
        public void ShouldBook_1st_MostPopularHotel_Mallorca()
        {
            //Select the uk location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Mallorca (Majorca)").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).Search();

            //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 first room option of the first hotel displayed on the very first result page
            HotelResultsPage.SelectRoom().ByHotelNumber(HotelResultsPageRnd.PickRandomHotel()).OnlyOneRoomWithAvailableRoom(1).Continue();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Beispiel #3
0
        public void ShouldBookFromSupplier_Sol_ForDestination_Benidorm()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Benidorm").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).Search();

            //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");

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

            //check if sol supplier is available from first results page
            Assert.That(HotelResultsPage.ContainsRoomFromSupplier("SOL (PELICANOS OCAS) (A)"), Is.True, "Sol supplier isn't displayed on first result page");

            //Select first room option of the first hotel displayed on the very first result page
            HotelResultsPage.SelectRoom().ByFirstSupplier("SOL (PELICANOS OCAS) (A)").Continue();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment page is not displayed");
        }
Beispiel #4
0
        public void HotelResultsPageOnlyOneRoomByHotelNameShouldReturnValidData()
        {
            string destination = "London, United Kingdom";
            string checkIn     = DateTime.Today.AddMonths(5).ToShortDateString();
            string checkOut    = DateTime.Today.AddMonths(5).AddDays(7).ToShortDateString();
            int    adults      = 4;
            int    children    = 2;

            int[] childrenAges = new int[] { 5, 7 };

            HomePage.SearchFor().HotelOnly().ToHotelName(destination).FromCheckIn(checkIn).ToCheckOut(checkOut)
            .ForAdults(adults).WithChildren(children).OfAges(childrenAges).SearchAndCapture();

            //check if result page is displayed
            Assert.AreEqual(true, HotelResultsPage.IsDisplayed(), "Hotel Search Result Page isn't displayed");

            string hotelName     = "Somerset Hotel";
            int    availableRoom = 2;

            HotelResultsPage.SelectRoom().ByHotelName(hotelName).OnlyOneRoomWithAvailableRoom(availableRoom).ContinueAndCapture();

            //check if result page is displayed
            Assert.AreEqual(true, ExtrasPage.IsDisplayed(), "Hotel Extras Page isn't displayed");

            Assert.IsTrue(!String.IsNullOrEmpty(HotelResultsPage.Data.HotelSearchGuid));
            Assert.IsTrue(HotelResultsPage.Data.LoadingTime.TotalMilliseconds > 0);
            Assert.AreEqual(hotelName, HotelResultsPage.Data.HotelName);
            Assert.AreEqual(1, HotelResultsPage.Data.Rooms.Length);
            Assert.AreEqual(availableRoom, HotelResultsPage.Data.Rooms[0].AvailableRoom);
        }
Beispiel #5
0
        public void ShouldBookFromSupplier_ItalCamel_ForDestination_Venice()
        {
            //Select the uk location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Venice").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).Search();

            //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");

            //check if ItalCamel supplier is available from first results page
            //Assert.That(HotelResultsPage.ContainsRoomFromSupplier("ItalCamel (6)"), "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.SelectRoom().ByFirstSupplier("ItalCamel (6)").Continue();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Beispiel #6
0
        public void HotelResultsPageMultipleRoomsShouldReturnValidData()
        {
            string destination = "London, United Kingdom";
            string checkIn     = DateTime.Today.AddMonths(5).ToShortDateString();
            string checkOut    = DateTime.Today.AddMonths(5).AddDays(7).ToShortDateString();
            int    adults      = 2;
            int    children    = 1;

            int[] childrenAges = new int[] { 5 };
            int   adults2      = 1;
            int   children2    = 2;

            int[] childrenAges2 = new int[] { 1, 2 };
            int   adults3       = 3;
            int   children3     = 1;

            int[] childrenAges3 = new int[] { 3 };

            HomePage.SearchFor().HotelOnly().ToHotelName(destination).FromCheckIn(checkIn).ToCheckOut(checkOut)
            .ForAdults(adults).WithChildren(children).OfAges(childrenAges)
            .AddAnotherRoom().ForAdults(adults2).WithChildren(children2).OfAges(childrenAges2)
            .AddAnotherRoom().ForAdults(adults3).WithChildren(children3).OfAges(childrenAges3)
            .SearchAndCapture();

            //check if result page is displayed
            Assert.AreEqual(true, HotelResultsPage.IsDisplayed(), "Hotel Search Result Page isn't displayed");

            string hotelName = "Hilton London Metropole";
            int    availableRoom = 1, availableRoom2 = 2, availableRoom3 = 1;

            HotelResultsPage.SelectRoom().ByHotelName(hotelName)
            .ForRoomNumber(1).WithAvailableRoom(availableRoom)
            .ForRoomNumber(2).WithAvailableRoom(availableRoom2)
            .ForRoomNumber(3).WithAvailableRoom(availableRoom3).ContinueAndCapture();

            //check if result page is displayed
            Assert.AreEqual(true, ExtrasPage.IsDisplayed(), "Hotel Extras Page isn't displayed");

            Assert.IsTrue(!String.IsNullOrEmpty(HotelResultsPage.Data.HotelSearchGuid));
            Assert.IsTrue(HotelResultsPage.Data.LoadingTime.TotalMilliseconds > 0);
            Assert.AreEqual(hotelName, HotelResultsPage.Data.HotelName);
            Assert.AreEqual(3, HotelResultsPage.Data.Rooms.Length);
            Assert.AreEqual(availableRoom, HotelResultsPage.Data.Rooms[0].AvailableRoom);
            Assert.AreEqual(availableRoom2, HotelResultsPage.Data.Rooms[1].AvailableRoom);
            Assert.AreEqual(availableRoom3, HotelResultsPage.Data.Rooms[2].AvailableRoom);
        }
        public void ShouldBookRandomMultipleRoom_ForDestination_Mallorca()
        {
            //HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            HomePage.SearchFor().HotelOnly().ToDestination("Mallorca").FromCheckIn("01/09/2014").ToCheckOut("08/09/2014")
            .ForAdults(2).AddAnotherRoom().ForAdults(1).WithChildren(2).OfAges(0, 5).Search();

            Assert.That(HotelResultsPage.IsDisplayed(), Is.True, "Hotel result page is not displayed");

            HotelResultsPage.SelectRoom().ByHotelNumber(5).ForRoomNumber(1).WithAvailableRoom(1).ForRoomNumber(2).WithAvailableRoom(2).Continue();

            Assert.That(ExtrasPage.IsDisplayed(), Is.True, "Extras Page not showing");

            ExtrasPage.Save(Information.Hotel);

            Assert.That(HotelResultsPage.Data.HotelName == ExtrasPage.Data.HotelName, Is.True, "Differing hotel names from SR to Extras");

            ExtrasPage.BookHotel().Continue();

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

            PaymentPage.Save(Information.Hotel);

            Assert.That(ExtrasPage.Data.HotelName == PaymentPage.Data.HotelName, Is.True, "Hotel name differs from Extras to Payment");

            PaymentPage.MakeAHotelBooking()
            .ForGuestDetailsNumber(1).OfRoomNo(1).WithTitle(Title.Mr).WithFirstName("Test").WithLastName("Test")
            .ForGuestDetailsNumber(2).OfRoomNo(1).WithTitle(Title.Mr).WithFirstName("Test").WithLastName("Test")
            .ForGuestDetailsNumber(1).OfRoomNo(2).WithTitle(Title.Mr).WithFirstName("Test").WithLastName("Test")
            .ForGuestDetailsNumber(2).OfRoomNo(2).WithTitle(Title.Mr).WithFirstName("Test").WithLastName("Test")
            .ForGuestDetailsNumber(3).OfRoomNo(2).WithTitle(Title.Mr).WithFirstName("Test").WithLastName("Test")
            .ForContactDetails().AutoFill()
            .ForPaymentDetails()
            .WithPaymentType(Card.Mastercard)
            .WithCardHolderName("Test Test")
            .WithCardNo("5569510003306537")
            .WithExpiryDate("03/15")
            .WithSecurityCode("123")
            .WithPostCode("S11 8NX")
            .ForStaffDetails().WithReference("test").WithCustomerPhone("1")
            .Confirm();
        }
Beispiel #8
0
        public void ShouldMakeFlightOnlyBookingWithRandomData()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().FlightOnly().ToDestination("Malaga").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("Dublin, Republic Of Ireland (DUB)")
            .ForAdults(2).WithChildren(2).OfAges(2, 4).Search();

            //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");

            //Search for supplier TP
            //Assert.That(FlightResultsPage.ContainsFlightFromSupplier("TP"), "TP supplier is not displayed on first result page");

            //Select first room option of the first hotel displayed on the very first result page
            //FlightResultsPage.SelectFlight().ByFirstSupplier("TP").ContinueAndCapture();

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

            Assert.That(HotelResultsPage.IsDisplayed(), "Hotel Result page is not displayed");

            Assert.That(HotelResultsPage.AreResultsDisplayed(), "No hotel results are available");

            HotelResultsPage.SelectRoom().ByHotelNumber(1).ForRoomNumber(1).WithAvailableRoom(1).Continue();


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

            ExtrasPage.Confirm(Information.Flight);

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Beispiel #9
0
        public void ShouldBookRandomSupplier_ForDestination_Majorca()
        {
            //Select the uk location
            HomePage.TopPanel.ClickLocation(Location.UnitedKingdom);

            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Majorca").FromCheckIn("29/09/2014")
            .ToCheckOut("07/10/2014").SearchAndCapture();

            //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");

            //Click on a random hotel from results page
            //HotelResultsPage.ClickHotelNumber(HotelResultsPageRnd.PickRandomHotel());

            //Check if hotel detail page is displayed
            //Assert.That(HotelDetailPage.IsDisplayed(), "Hotel Detail Page isn't displayed within 60 sec");

            //Click the first available room from hotel detail page
            //HotelDetailPage.SelectRoom().WithAvailableRoom(1).ContinueAndCapture();

            //Select Room 1 of a random hotel from the first result page
            HotelResultsPage.SelectRoom().ByHotelNumber(12).OnlyOneRoomWithAvailableRoom(1).ContinueAndCapture();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
        public void HotelOnlyDestinationSearch_Tenerife()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToDestination("Tenerife").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).SearchAndCapture();

            //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 first room option of the first hotel displayed on the very first result page
            HotelResultsPage.SelectRoom().ByHotelNumber(HotelResultsPageRnd.PickRandomHotel()).OnlyOneRoomWithAvailableRoom(1).ContinueAndCapture();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }
Beispiel #11
0
        public void ShouldBook_3rd_MostPopularHotel_Costa_Del_Sol()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().HotelOnly().ToHotelName("Costa Del Sol").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).Search();

            //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");

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

            //Select first room option of the first hotel displayed on the very first result page
            HotelResultsPage.SelectRoom().ByHotelNumber(1).OnlyOneRoomWithAvailableRoom(1).Continue();

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

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

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment page is not displayed");
        }