public void HotelDetailsPageOnlyOneRoomShouldReturnValidData() { 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"); int hotelNumber = 1; HotelResultsPage.ClickHotelNumberAndCapture(hotelNumber); //check if result page is displayed Assert.AreEqual(true, HotelDetailPage.IsDisplayed(), "Hotel Details Page isn't displayed"); int availableRoom = 2; HotelDetailPage.SelectRoom().OnlyOneRoomWithAvailableRoom(availableRoom).ContinueAndCapture(); Assert.IsTrue(HotelDetailPage.Data.LoadingTime.TotalMilliseconds > 0); Assert.AreEqual(1, HotelDetailPage.Data.Rooms.Length); Assert.AreEqual(availableRoom, HotelDetailPage.Data.Rooms[0].AvailableRoom); }
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 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"); }
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 ShouldSearch_MostPopularRoutes_ForAllMultiCom_Suppliers(HotelExtrasTestScript script) { //check if homepage is displayed Assert.That(HomePage.IsDisplayed(), Is.True, "Homepage isn't displayed"); //Select united kingdom as the user location HomePage.TopPanel.ClickLocation(Location.UnitedKingdom); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName(script.HotelName).FromCheckIn(Calendar.PickRandomCheckInDate()) .ToCheckOut(Calendar.PickRandomCheckOutDate()).Search(); //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 extra page is displayed Assert.That(ExtrasPage.IsDisplayed, Is.True, "Extra page is not been displayed"); //check if carhire is displayed Assert.That(ExtrasPage.IsExtraDisplayed(Extras.CarHire), Is.True, "Car Hire is not displayed on extra page"); //check if Airport Transfer is displayed //Assert.That(ExtrasPage.IsVisible(Extras.Airport_Transfer), Is.True, "Airport Transport is not displayed on extra page"); //Expand Car Hire ExtrasPage.ExpandExtraLink(Extras.CarHire); //Confirm if any results are available Assert.That(ExtrasPage.AreResultsDisplayed(Extras.CarHire), Is.True, "Car Hire results not available by default"); //Confirm if any results are available //Assert.That(ExtrasPage.CheckResultsAvailabilityFor(Extras.Airport_Transfer), Is.True, "Airport Transfer results not available"); //Assert.That(ExtrasPage.IsVisible(Extras.Airport_Transfer), Is.True, "Airport Transfer is not Visible on extra page"); //Assert.That(ExtrasPage.IsVisible(Extras.Hold_luggage), Is.True, "Airport Transfer is not Visible on extra page"); Assert.Pass(script.TestName + " Sucessful"); }
public void ShouldMakeHotelOnlyBooking() { //check if homepage is displayed Assert.That(HomePage.IsDisplayed(), Is.True, "Homepage isn't displayed"); //Select united kingdom as the user location HomePage.TopPanel.ClickLocation(Location.UnitedKingdom); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName("Playa Real Resort").FromCheckIn("24/09/2014") .ToCheckOut("30/09/2014").Search(); //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 extra page is displayed Assert.That(ExtrasPage.IsDisplayed, Is.True, "Extra page is not been displayed"); //check if carhire is displayed Assert.That(ExtrasPage.IsExtraDisplayed(Extras.CarHire), Is.True, "Car Hire is not Visible on extra page"); //Expand Car Hire ExtrasPage.ExpandExtraLink(Extras.CarHire); //Confirm if any results are available Assert.That(ExtrasPage.AreResultsDisplayed(Extras.CarHire), Is.True, "Car Hire results not available by default"); //check if homepage is displayed Assert.That(HomePage.IsDisplayed(), Is.True, "Homepage isn't displayed"); //Enter Hotel only search data HomePage.SearchFor().HotelOnly().ToHotelName("Africa El Mouradi Hotel").FromCheckIn(Calendar.PickRandomCheckInDate()) .ToCheckOut(Calendar.PickRandomCheckOutDate()) /*.AddAnotherRoom().ForAdults(2).WithChildren(1).OfAges(2)*/.Search(); //HotelResultsPage.ClickHotelNumber(1); Assert.That(HotelDetailPage.IsDisplayed(), Is.True, "Hotel Result page is not displayed"); // HotelDetailPage.SelectRoom().OnlyOneRoomWithAvailableRoom(1).ContinueAndCapture(); //extra page is displayed Assert.That(ExtrasPage.IsDisplayed, Is.True, "Hotel Summary page is not been displayed"); // Assert.That(ExtrasPage.IsExtraDisplayed(Extras.CarHire), Is.True, "Car Hire is not Visible on extra page"); Assert.That(ExtrasPage.IsExtraDisplayed(Extras.AirportTransfer), Is.True, "Airport Transfer is not Visible on extra page"); Assert.That(ExtrasPage.IsExtraDisplayed(Extras.HoldLuggage), Is.True, "Airport Transfer is not Visible on extra page"); //FlightResultsPage.FindFlightForFirstSupplier() //HotelResultsPage.ClickHotelNumber(HotelResultsPage.FindHotel("TRH Jardin Del Mar, Santa Ponsa")); //HotelResultsPage.SelectRoom().ByHotelNumber(1).ForRoomNumber(1).WithAvailableRoom(1).Continue(); //HotelDetailPage.SelectRoom().WithAvailableRoom(2).ContinueAndCapture(); //HotelDetailPage.SelectRoom().ByFirstSupplier("JT (Y)").ContinueAndCapture(); //HotelDetailPage.SelectRoom().WithAvailableRoom(4).Continue(); //HotelDetailPage.SelectRoom().WithAvailableRoom(1).Continue(); //HotelDetailPage.SelectRoom().ForRoomNumber(1).WithAvailableRoom(1).ForRoomNumber(2).WithAvailableRoom(2).Continue(); //HotelDetailPage.SelectRoom().ByFirstSupplier("JT (Y)").Continue(); }