Example #1
0
        public void TravelersAdultsWarning()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .PressTravelers()
                                  .PressTravelersAdultsIncrements(MAX_CLICKS_TRAVELERS_ADULTS);

            Assert.AreEqual(flights.get_AdultsWarning, "Поиск поддерживает не более 9 взрослых");
        }
Example #2
0
        public void WorkingDisavledPlace()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .PressRoundTrip()
                                  .PressRoundTripOneWay();

            Assert.AreEqual(flights.get_InfoPlaceIsDisabled, false);
        }
Example #3
0
        public void MaxTravelersWarning()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .PressTravelers()
                                  .PressTravelersAdultsIncrements(MAX_CLICKS_TRAVELERS_ADULTS)
                                  .PressTravelersTeenIncrements(MAX_CLICKS_TRAVELERS_TEENS);

            Assert.AreEqual(flights.get_MaxTravelersWarning, "Поиск поддерживает не более 16 пассажиров");
        }
Example #4
0
        public void TravelersChildsWarning()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .PressTravelers()
                                  .PressTravelersChildIncrement()
                                  .PressTravelersChildIncrement();

            Assert.AreEqual(flights.get_ChildWarning, "Детей без места не может быть больше, чем взрослых");
        }
Example #5
0
        public void FlightSearch()
        {
            var flight = new FlightsPage(driver);

            flight.FlightBooking();
            string title = "Makemytrip";

            Assert.AreEqual(title, driver.Title);
        }
Example #6
0
        public void OpenFlightsPageTest()
        {
            HomePage homePage = new HomePage(driver);

            homePage.OpenPage();
            FlightsPage flightsPage = homePage.GoToFlightsPage();

            Assert.True(flightsPage.IsOpen());
        }
Example #7
0
        public void RequestValidation()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .InputDepartureCityValue(FlightsCreator.WithAllProperties())
                                  .AcceptFirstValuOnTravelList()
                                  .InputArrivalCityValue(FlightsCreator.WithAllProperties())
                                  .AcceptFirstValuOnTravelList()
                                  .PressSearch();

            Assert.AreEqual(flights.get_Error, "Пожалуйста, задайте конкретные аэропорты отправления (Откуда) и прибытия (Куда).");
        }
Example #8
0
        public void FlightsSearchChildsAdvise()
        {
            FlightsPage flights = new FlightsPage(driver).OpenFlightsPage()
                                  .PressTravelers()
                                  .PressTravelersChildIncrement()
                                  .PressRoundTrip()
                                  .InputArrivalCityValue(FlightsCreator.OnlyArrivalCity())
                                  .AcceptFirstValuOnTravelList()
                                  .PressSearch();

            Assert.AreEqual(flights.get_ChildAdvise, "Некоторые авиакомпании взимают плату за младенцев без места. Мы показываем общую цену за всех пассажиров.");
        }
Example #9
0
        public void RequestValidation()
        {
            FlightsPage flights = new FlightsPage(driver);

            string text_Input = "Стамбул";

            flights.InputFromValue(text_Input);
            flights.InputToValue(text_Input);
            flights.PressSearch();

            Assert.AreEqual(flights.get_messageError, "Пожалуйста, задайте конкретные аэропорты отправления (Откуда) и прибытия (Куда).");
        }
Example #10
0
        public void TestMethod1()
        {
            HomePage    homePage    = new HomePage(driver);
            FlightsPage flightsPage = new FlightsPage(driver);

            homePage.GoToPage();
            homePage.enterDataAndSearchFlight();

            flightsPage.changeTheDepartureAndReturnDates();
            flightsPage.selectTarifaValueForDeparture();
            flightsPage.selectTarifaValueForReturn();
            flightsPage.clickOnButtonLoginLater();
            flightsPage.fillPassengersDetails();
            flightsPage.clickOnContinueButton();
        }
Example #11
0
        public void ModuleFlightsTest()
        {
            TestPage    testPage    = new TestPage();
            FlightsPage flightsPage = new FlightsPage();

            flightsPage.StepNavigateToFlightsTab();
            testPage.StepHandleNewTab();
            flightsPage.StepNavigateToOneWay();
            flightsPage.StepNavigateToMultiCity();
            flightsPage.StepNavigateToRoundTrip();
            flightsPage.StepEnterFromWhere("Sarajevo");
            flightsPage.StepChooseFromDestination();
            flightsPage.StepEnterToWhere("Istanbul");
            flightsPage.StepChooseToDestination();
            flightsPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("MMMM dd"));
            flightsPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("MMMM dd"));
            flightsPage.StepClickOnSearch();
        }
        public void WhenIClickOnFlightsTab()
        {
            var flightPage = new FlightsPage(this.driverContext);

            flightPage.ClickOnFlightsBtn();
        }
        public void SmokeTest()
        {
            #region Instance of Classes
            TestPage          testPage          = new TestPage();
            SignInPage        signInPage        = new SignInPage();
            AccommodationPage accomodiationPage = new AccommodationPage();
            ReservationPage   reservationPage   = new ReservationPage();
            BookingPage       bookingPage       = new BookingPage();
            FlightsPage       flightsPage       = new FlightsPage();
            RentalCarsPage    rentalCarsPage    = new RentalCarsPage();
            AirportTaxisPage  airportTaxisPage  = new AirportTaxisPage();
            #endregion

            #region Test Steps
            /** Steps from Module SignIn */
            signInPage.StepClickOnSignIn();
            signInPage.StepEnterUsername("*****@*****.**");
            signInPage.StepEnterPassword("harisamila");
            signInPage.StepVerifyWelcomePopUp();
            signInPage.StepCloseWelcomePopup();

            /** Steps from Module Accomodiation */
            accomodiationPage.StepEnterDestination("Istanbul");
            accomodiationPage.StepChoosePopularDestination();
            accomodiationPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepClickOnSearch();
            accomodiationPage.StepChooseStarRating("3");
            accomodiationPage.StepChooseOnlyAvailableProperties();
            accomodiationPage.StepChooseReviewScore("70");
            accomodiationPage.StepNavigateToTab("Distance From Downtown");
            accomodiationPage.StepNavigateToTab("Star rating and price");
            accomodiationPage.StepNavigateToTab("Stars");
            accomodiationPage.StepNavigateToTab("Review Score & Price");
            accomodiationPage.StepNavigateToTab("Price (lowest first)");
            accomodiationPage.StepNavigateToTab("Our Top Picks");
            accomodiationPage.StepSelectAccomodiation();
            testPage.StepHandleNewTab();

            /** Steps from Module Reservation */
            reservationPage.StepClickOnReserve();

            /** Steps from Module Booking */
            //bookingPage.StepClickOnCloseAlmostYoursPopUp();
            bookingPage.StepChooseTravelingForWork();
            bookingPage.StepSelectTitle();
            bookingPage.StepEnterFirstName("Amila");
            bookingPage.StepEnterLastName("Zimic");
            bookingPage.StepVerifyEmail("*****@*****.**");
            bookingPage.StepVerifyConfirmEmail("*****@*****.**");
            bookingPage.StepChooseBookingFor();
            bookingPage.StepEnterFullGuestName();
            bookingPage.StepClickOnFinal();
            testPage.StepCloseNewTab();
            signInPage.StepClickOnHomeButton();

            /** Steps from Module Flisghts */
            flightsPage.StepNavigateToFlightsTab();
            testPage.StepHandleNewTab();
            flightsPage.StepNavigateToOneWay();
            flightsPage.StepNavigateToMultiCity();
            flightsPage.StepNavigateToRoundTrip();
            flightsPage.StepEnterFromWhere("Sarajevo");
            flightsPage.StepChooseFromDestination();
            flightsPage.StepEnterToWhere("Istanbul");
            flightsPage.StepChooseToDestination();
            flightsPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("MMMM dd"));
            flightsPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("MMMM dd"));
            flightsPage.StepClickOnSearch();
            testPage.StepHandleNewTab();
            testPage.StepCloseNewTab();

            /** Steps from Module AirportTaxis */
            airportTaxisPage.StepNavigateToAirportTaxisTab();
            testPage.StepHandleNewTab();
            airportTaxisPage.StepEnterPickUpLocation("Istanbul");
            airportTaxisPage.StepChoosePickUpLocation();
            airportTaxisPage.StepEnterDropOffLocation("Blue Mosque");
            airportTaxisPage.StepChooseDropOffLocation();
            airportTaxisPage.StepClickOnSearch();
            airportTaxisPage.StepClickOnBookTaxi();
            airportTaxisPage.StepSelectTitle();
            airportTaxisPage.StepEnterFirstName("Amila");
            airportTaxisPage.StepEnterLastName("Zimic");
            airportTaxisPage.StepEnterEmail("*****@*****.**");
            airportTaxisPage.StepConfirmEmail("*****@*****.**");
            airportTaxisPage.StepChooseCountry();
            airportTaxisPage.StepEnterMobileNumber("62253119");
            airportTaxisPage.StepClickOnContinueToBook();
            #endregion
        }