public void ReserveThreeSeatsAdvancePageObjectPattern() { using (IWebDriver driver = new FirefoxDriver()) { Uri uri = new Uri(this.url); driver.Navigate().GoToUrl(uri); EliteMoviePage eliteMoviePage = new EliteMoviePage(driver); SelectionSchedulePage schedulePage = eliteMoviePage.SelectFilm("El Violinista del diablo"); Thread.Sleep(TimeSpan.FromSeconds(3)); AssignSeatPage assignSeatPage = schedulePage.SelectFunctionAndAmountSeats(2, 3); Thread.Sleep(TimeSpan.FromSeconds(3)); ConfirmationPage confirmationPage = assignSeatPage.SelectSeats(); Thread.Sleep(TimeSpan.FromSeconds(3)); confirmationPage.Finish(); } List<Seat> expectedResult = new List<Seat>() { new Seat() { Booked = true, Column = 12, Row = 4 }, new Seat() { Booked = true, Column = 13, Row = 4 }, new Seat() { Booked = true, Column = 14, Row = 4 } }; GenericApiValidator.AssertBookedSeats(expectedResult); }
public EliteMovieEntryPoint() { this.eliteMovie = new EliteMoviePage(); this.schedule = new SelectionSchedulePage(); this.assignSeat = new AssignSeatPage(); this.confirmation = new ConfirmationPage(); }
public void Showtest() { foreach (var driver in Driver.Current) { AddressPage addressPagecs = new AddressPage(driver); addressPagecs.AddNewAddress(); AddNewAddressPage addNewAddressPage = new AddNewAddressPage(driver); AddressPageModel addressPageModel = new AddressPageModel(); addNewAddressPage.Map.GetElements(); addNewAddressPage.FeedDataToPageForm(addressPageModel); ConfirmationPage confirmationPage = new ConfirmationPage(driver); string id = confirmationPage.GetId().ToString(); confirmationPage.GoToAddressesPage(); addressPagecs.ShowRow(id); Urls urls = new Urls(); Assert.AreEqual(urls._confirmationPage + id, driver.Url); } }
public void LaunchBrowser() { driver = Utils.Utils.OpenBrowser("http://newtours.demoaut.com/mercurypurchase.php", "chrome"); loginPage = new LoginPage(driver); findFlightPage = new FindFlightPage(driver); selectFlightPage = new SelectFlightPage(driver); bookFlightPage = new BookFlightPage(driver); confirmationPage = new ConfirmationPage(driver); }
public void When_I_Confirm_An_Account_With_The_Following_Information(Table table) { string userId = table.Rows[0]["UserName"]; CurrentUser = GetUser(userId); ConfirmationPage confirmation = new ConfirmationPage(); UserAccountConfirmationViewModel confirmationData = table.CreateInstance<UserAccountConfirmationViewModel>(); confirmation.Submit(confirmationData); }
public static void TestAndSaveResult(IWebDriver container) { int val = 0; ExcelDataHelper.PopulateInCollection(BoundaryCasePath); for (int i = 0; i < 5; i++) { try { DashBoardAfterLogin(container); CartPage cart = new CartPage(); Thread.Sleep(1000); //clear the original data and set a new one SeleniumUtil.SetText(cart.Quantity, ""); Thread.Sleep(3000); SeleniumUtil.SetText(cart.Quantity, ExcelDataHelper.ReadData((i + 1), "quantity")); Thread.Sleep(3000); //string index = ExcelDataHelper.ReadData((i + 1), "shippingIndex"); //Int32.TryParse(index, out val); //SeleniumMethods.SelectDropDown(cart.Shipping.ElementAtOrDefault<IWebElement>(1), val); //Thread.Sleep(1000); string total = SeleniumUtil.GetText(cart.FinalTotal); Thread.Sleep(2000); if (!total.Equals(null)) { ExcelDataHelper.WriteData(BoundaryCasePath, (2 + i), 3, total); } SeleniumUtil.Click(cart.Proceed); ConfirmationPage confirmation = new ConfirmationPage(); Thread.Sleep(1000); total = SeleniumUtil.GetText(confirmation.FinalPaymentTotal); Thread.Sleep(1000); if (!total.Equals(null)) { ExcelDataHelper.WriteData(BoundaryCasePath, (2 + i), 4, total); } } catch (Exception e) { continue; } } }
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"); }
// This function overrides elements of the native renderer protected override void OnElementChanged(VisualElementChangedEventArgs e) { base.OnElementChanged(e); myPage = (ConfirmationPage)e.NewElement; if (e.OldElement != null || Element == null) { return; } try { SetupUserInterface(); SetupEventHandlers(); } catch (Exception ex) { myPage.CameraUnableToLoad(ex.Message); } }
public void ReserveThreeSeatsThreeLayerPageObject() { using (IWebDriver driver = new FirefoxDriver()) { Uri uri = new Uri(this.url); driver.Navigate().GoToUrl(uri); EliteMoviePage eliteMoviePage = new EliteMoviePage(driver); SelectionSchedulePage schedulePage = eliteMoviePage.SelectFilm("El Violinista del diablo"); Thread.Sleep(TimeSpan.FromSeconds(3)); AssignSeatPage assignSeatPage = schedulePage.SelectFunctionAndAmountSeats(2, 3); Thread.Sleep(TimeSpan.FromSeconds(3)); ConfirmationPage confirmationPage = assignSeatPage.SelectSeats(); Thread.Sleep(TimeSpan.FromSeconds(3)); confirmationPage.Finish(); } List <Seat> bookedSeats = ReserveTest.ObtainReserveSeats(); List <Seat> expectedResult = new List <Seat>() { new Seat() { Booked = true, Column = 12, Row = 4 }, new Seat() { Booked = true, Column = 13, Row = 4 }, new Seat() { Booked = true, Column = 14, Row = 4 } }; CollectionAssert.AreEquivalent(expectedResult, bookedSeats); }
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); }
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"); }
public void WhenConfirmarAQueOProjetoSeraDeletado() { var confirmPage = new ConfirmationPage(); confirmPage.ClickConfimerDeleteProject(); }
public void WhenIClickSend() { confirmationPage = enterDetailsPage.ClickSend(); }
public async Task Confirmation(string titleConfirmation, string detailConfirmation, string url) { ConfirmationPage confirmation = new ConfirmationPage(titleConfirmation, detailConfirmation, url); await PopupNavigation.PushAsync(confirmation); }
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"); }