public void SearchTripsWithReturnOption() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); TripInfo trip = TripInfoCreator.SetAllProperties(); OrderTripPage orderTripPage = new MainPage(Driver) .InputTripInfo(trip) .InputReturnDate(trip) .ClickSendRequestButton(); Assert.AreEqual(orderTripPage.CountOfRoutes(), 2); Logger.Log.Info("Test complete successfully"); }
public void FalsePassengerInfo() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); CarriagePage travelerInfoPage = new MainPage(Driver) .InputTripInfo(TripInfoCreator.SetAllProperties()) .CancelReturnTrip() .ClickSendRequestButton() .ClickSelectCarriageButton(); Assert.IsTrue(travelerInfoPage.State()); Logger.Log.Info("Test complete successfully"); }
public void SearchTrips() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); TripInfo trip = TripInfoCreator.SetAllProperties(); OrderTripPage orderTripPage = new MainPage(Driver) .InputTripInfo(trip) .CancelReturnTrip() .ClickSendRequestButton(); Assert.AreEqual(trip.DepartureStation, orderTripPage.DepartureStationInfo()); Assert.AreEqual(trip.ArrivalStation, orderTripPage.ArrivalStationInfo()); Logger.Log.Info("Test complete successfully"); }
public void ChooseReservedSeat() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); TripInfo trip = TripInfoCreator.SetAllProperties(); CarriagePage carriagePage = new MainPage(Driver) .InputTripInfo(trip) .InputReturnDate(trip) .ClickSendRequestButton() .ClickSelectCarriageButton(); Assert.IsFalse(carriagePage.ChooseReservedSeat()); Logger.Log.Info("Test complete successfully"); }
public void CheckSumOfTickets() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); TravelerInfoPage travelerInfoPage = new MainPage(Driver) .InputTripInfo(TripInfoCreator.SetAllProperties()) .CancelReturnTrip() .ClickSendRequestButton() .ClickSelectCarriageButton() .SelectWagonAndSeat() .ChangePassenger() .SelectWagonAndSeat() .ClickConfirmButton(); Assert.IsTrue(travelerInfoPage.ArePricesEqual()); Logger.Log.Info("Test complete successfully"); }
public void FalsePassengerInfo() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); TravelerInfoPage travelerInfoPage = new MainPage(Driver) .InputTripInfo(TripInfoCreator.SetAllProperties()) .CancelReturnTrip() .ClickSendRequestButton() .ClickSelectCarriageButton() .SelectWagonAndSeat() .ClickConfirmButton() .InputPassengerInfo(PassengerInfoCreator.SetInvalidInfo()) .ClickHotelsButton(); Assert.IsTrue(travelerInfoPage.ErrorTooltip.Displayed); Logger.Log.Info("Test complete successfully"); }
public void SuccessBookingTest() { Logger.InitLogger(); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); BookingPage bookingPage = new MainPage(Driver) .InputTripInfo(TripInfoCreator.SetAllProperties()) .CancelReturnTrip() .ClickSendRequestButton() .ClickSelectCarriageButton() .SelectWagonAndSeat() .ClickConfirmButton() .InputPassengerInfo(PassengerInfoCreator.SetNormalInfo()) .ClickBookingButton(); Assert.AreEqual(bookingPage.GetReviewOrder(), ReviewOrder); Logger.Log.Info("Test complete successfully"); }