示例#1
0
        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");
        }
示例#2
0
        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");
        }