Ejemplo n.º 1
0
 def test_flight_details(self):
     self.homePage = FlightHomePage(self.driver)
     self.homePage.select_round_trip()
     self.destinations = SelectDestinations(self.driver)
     self.destinations.select_destinations()
     self.driver.execute_script("window.scrollTo(0, 300)")
     self.daterange = SelectDateRange(self.driver)
     self.daterange.select_daterange()
     self.passengerinfo = SelectPassengerInfo(self.driver)
     self.passengerinfo.select_passengers()
     self.searchflight = SearchFlight(self.driver)
     self.searchflight.search_flight()
     self.assertTrue(
         self.searchflight.is_visible(FlightLocators.pageassertion))
     self.book = BookFlight(self.driver)
     self.book.book_flight()
     self.book.standard_fare()
     self.flightdetails = FlightDetails(self.driver)
     self.flightdetails.select_seats()
     self.flightdetails.select_meals()
     self.flightdetails.select_baggage()
     self.flightdetails.contact_details()
     self.flightdetails.traveler_details()
     self.assertTrue(
         self.flightdetails.is_visible(FlightLocators.PaymentAssert))
Ejemplo n.º 2
0
 def test_user_should_be_able_to_select_dates(self):
     self.homePage = FlightHomePage(self.driver)
     self.homePage.select_round_trip()
     self.destinations = SelectDestinations(self.driver)
     self.destinations.select_destinations()
     self.driver.execute_script("window.scrollTo(0, 300)")
     self.daterange = SelectDateRange(self.driver)
     self.daterange.select_daterange()
Ejemplo n.º 3
0
 def test_searchflight(self):
     self.homePage = FlightHomePage(self.driver)
     self.homePage.select_round_trip()
     self.destinations = SelectDestinations(self.driver)
     self.destinations.select_destinations()
     self.driver.execute_script("window.scrollTo(0, 300)")
     self.daterange = SelectDateRange(self.driver)
     self.daterange.select_daterange()
     self.passengerinfo = SelectPassengerInfo(self.driver)
     self.passengerinfo.select_passengers()
     self.searchflight = SearchFlight(self.driver)
     self.searchflight.search_flight()
     self.assertTrue(
         self.searchflight.is_visible(FlightLocators.pageassertion))
Ejemplo n.º 4
0
 def test_user_should_be_able_to_select_destinations(self):
     self.homePage = FlightHomePage(self.driver)
     self.homePage.select_round_trip()
     self.destinations = SelectDestinations(self.driver)
     self.destinations.select_destinations()
Ejemplo n.º 5
0
class Test_ClearTrip(Test_ClearTrip_Url):
    def setUp(self):
        super().setUp()

    def test_home_page_loaded_successfully(self):
        self.homePage = FlightHomePage(self.driver)
        self.assertIn(FlightData.HOME_PAGE_TITLE, self.homePage.driver.title)

    def test_user_should_be_able_to_selectTrip(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()

    def test_user_should_be_able_to_select_destinations(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()

    def test_user_should_be_able_to_select_dates(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()
        self.driver.execute_script("window.scrollTo(0, 300)")
        self.daterange = SelectDateRange(self.driver)
        self.daterange.select_daterange()

    def test_user_should_be_able_to_select_passengerinfo(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()
        self.driver.execute_script("window.scrollTo(0, 300)")
        self.daterange = SelectDateRange(self.driver)
        self.daterange.select_daterange()
        self.passengerinfo = SelectPassengerInfo(self.driver)
        self.passengerinfo.select_passengers()

    def test_searchflight(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()
        self.driver.execute_script("window.scrollTo(0, 300)")
        self.daterange = SelectDateRange(self.driver)
        self.daterange.select_daterange()
        self.passengerinfo = SelectPassengerInfo(self.driver)
        self.passengerinfo.select_passengers()
        self.searchflight = SearchFlight(self.driver)
        self.searchflight.search_flight()
        self.assertTrue(
            self.searchflight.is_visible(FlightLocators.pageassertion))

    def test_bookbutton(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()
        self.driver.execute_script("window.scrollTo(0, 300)")
        self.daterange = SelectDateRange(self.driver)
        self.daterange.select_daterange()
        self.passengerinfo = SelectPassengerInfo(self.driver)
        self.passengerinfo.select_passengers()
        self.searchflight = SearchFlight(self.driver)
        self.searchflight.search_flight()
        self.assertTrue(
            self.searchflight.is_visible(FlightLocators.pageassertion))
        self.book = BookFlight(self.driver)
        self.book.book_flight()

    def test_flight_details(self):
        self.homePage = FlightHomePage(self.driver)
        self.homePage.select_round_trip()
        self.destinations = SelectDestinations(self.driver)
        self.destinations.select_destinations()
        self.driver.execute_script("window.scrollTo(0, 300)")
        self.daterange = SelectDateRange(self.driver)
        self.daterange.select_daterange()
        self.passengerinfo = SelectPassengerInfo(self.driver)
        self.passengerinfo.select_passengers()
        self.searchflight = SearchFlight(self.driver)
        self.searchflight.search_flight()
        self.assertTrue(
            self.searchflight.is_visible(FlightLocators.pageassertion))
        self.book = BookFlight(self.driver)
        self.book.book_flight()
        self.book.standard_fare()
        self.flightdetails = FlightDetails(self.driver)
        self.flightdetails.select_seats()
        self.flightdetails.select_meals()
        self.flightdetails.select_baggage()
        self.flightdetails.contact_details()
        self.flightdetails.traveler_details()
        self.assertTrue(
            self.flightdetails.is_visible(FlightLocators.PaymentAssert))