public void HotelOnlyDestinationSearch_Benidorm() { //Select the uk location HomePage.TopPanel.ClickLocation(Location.UnitedKingdom); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToDestination("Mallorca (Majorca)").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"); }
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"); }
public void ShouldBookRandomSupplier_ForDestination_Majorca() { //Select the uk location HomePage.TopPanel.ClickLocation(Location.UnitedKingdom); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToDestination("Majorca").FromCheckIn(Calendar.PickRandomCheckInDate()) .ToCheckOut(Calendar.PickRandomCheckOutDate()).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"); //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 random hotel from the first result page HotelResultsPage.ClickHotelNumber(HotelResultsPageRnd.PickRandomHotel()); //Check HotelDetailPage is displayed Assert.That(HotelDetailPage.IsDisplayed(), Is.True, "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(), Is.True, "Extras page is not displayed"); //Click Booknow button ExtrasPage.BookHotel().ContinueAndCapture(); //Check Payment Page is displayed Assert.That(PaymentPage.IsDisplayed(), Is.True, "Payment page is not displayed"); }
public void ShouldBookFromSupplier_JT_ForDestination_Paris() { //Select the uk location HomePage.TopPanel.ClickLocation(Location.UnitedKingdom); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName("Paris, France").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 JT supplier is available from first results page Assert.That(HotelResultsPage.ContainsRoomFromSupplier("JT (Y)"), Is.True, "JT 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("JT (Y)").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"); }
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(); }
public void ShouldBook_4th_MostPopularHotel_Tenerife() { //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName("Tenerife").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"); }
public void ShouldBook_2nd_MostPopularHotel_Benidorm() { //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName("Sol Pelicanos Ocas,Sol Pelicanos Ocas").FromCheckIn(Calendar.PickRandomCheckInDate()) .ToCheckOut(Calendar.PickRandomCheckOutDate()).AddAnotherRoom().Search(); //Check if result page is displayed within 60 sec //Assert.That(HotelDetailPage.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(HotelDetailPage., 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 HotelDetailPage.SelectRoom().ForRoomNumber(1).WithAvailableRoom(2).ForRoomNumber(2).WithAvailableRoom(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"); }
public void ShouldBookRandomSingleRoom_ForDestination_Benidorm() { //HomePage.ClickFlightOnly(); //HomePage.TypeFlightDestination("Benidorm"); //HomePage.SelectCheckIn("01/06/2014"); //HomePage.SelectCheckOut("08/06/2014"); //HomePage.SelectAirport("London (All Airports), London, United Kingdom (LON)"); //HomePage.SelectAdults(2); //HomePage.SelectChildren(2, new int[] {2,3}); //HomePage.ClickSearch(); //HomePage.SearchFor().FlightOnly().ToDestination("Benidorm").FromCheckIn("01/09/2014") // .ToCheckOut("08/09/2014").FromDepartureAirport("London (All Airports), London, United Kingdom (LON)") // .ForAdults(2).WithChildren(2).OfAges(2, 3).Search(); HomePage.SearchFor().HotelOnly().ToDestination("Benidorm").FromCheckIn("01/09/2014") .ToCheckOut("15/09/2014").ForAdults(2).Search(); Assert.That(HotelResultsPage.IsDisplayed(), Is.True, "Hotel result page is not displayed"); HotelResultsPage.ClickHotelNumber(1); HotelDetailPage.ClickAvaliableRoom(1); Assert.That(ExtrasPage.IsDisplayed(), Is.True, "Extras Page not showing"); //TODO ExtrasPage.Save(Information.Hotel); Assert.That(HotelResultsPage.Data.HotelName == ExtrasPage.Data.HotelName, Is.True, "Differing hotel names from SR to Extras"); //Assert.That(HotelResultsPage.Data.Rooms[0].RoomPrice+==ExtrasPage.Data. 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") .ForContactDetails().TypeFirstName("Test").WithLastName("Test").WithEmail("*****@*****.**").WithPhoneNumber("08719110030") .ForPaymentDetails() .WithPaymentType(Card.Mastercard) .WithCardHolderName("Test Test") .WithCardNo("5569510003306537") .WithExpiryDate("03/15") .WithSecurityCode("123") .WithPostCode("S11 8NX") .ForStaffDetails().WithReference("test").WithCustomerPhone("1") .Confirm(); //Assert.That(PaymentPage.Check3DSPage(), Is.True, "3DS page not displaying"); Assert.IsTrue(ConfirmationPage.IsDisplayed(), "Confirmation page isn't displayed within 60 sec"); Assert.IsTrue(ConfirmationPage.PNRNoIsDisplayed(), "PNR Number is empty"); //Assert.That(PaymentPage.ValidateConfirmationMsg(), Is.True, "Confirmation page not showing"); }