Esempio n. 1
0
 def test_not_listed_property_from(self):
     main_page = pageobject.MainPage(self.driver)
     estimate_page = pageobject.PropertyCapturePage(self.driver)
     main_page.click_first_estimate_my_property()
     estimate_page.input_address('34 thaa')
     time.sleep(3)
     estimate_page.property_not_listed()
     time.sleep(3)
     estimate_page.capture_property_form('23', '3', 'test st.', '')
     estimate_page.continue_btn()
     estimate_page.verify_suburb_error_msg()
Esempio n. 2
0
 def testFullOEJourneywithCL(self):
     main_page = pageobject.MainPage(self.driver)
     estimate_page = pageobject.PropertyCapturePage(self.driver)
     main_page.click_first_estimate_my_property()
     estimate_page.input_address('21 scotsman street')
     estimate_page.click_address()
     estimate_page.click_find_property()
     estimate_page.choose_property_type('Apartment')
     estimate_page.choose_relation('Investor')
     estimate_page.choose_condition('Good')
     time.sleep(2)
     estimate_page.change_attributes()
     time.sleep(2)
     estimate_page.click_next()
     time.sleep(2)
     estimate_page.choose_special_features('Pool')
     time.sleep(2)
     estimate_page.click_start_ranking()
     time.sleep(5)
Esempio n. 3
0
 def testFullOEJourney(self):
     main_page = pageobject.MainPage(self.driver)
     estimate_page = pageobject.PropertyCapturePage(self.driver)
     main_page.click_first_estimate_my_property()
     estimate_page.input_address('21 scotsman street')
     estimate_page.click_address()
     estimate_page.click_find_property()
     estimate_page.choose_property_type('Apartment')
     estimate_page.choose_relation('Investor')
     estimate_page.choose_condition('Good')
     estimate_page.change_attributes()
     estimate_page.click_next()
     estimate_page.choose_special_features('Pool')
     estimate_page.click_start_ranking()
     estimate_page.compare_loop('Better', 'Smaller', 'Worse',
                                'About the same', 'More')
     estimate_page.verify_new_lead_title()
     estimate_page.lead_form('nancy test', '*****@*****.**', '0414660628')
     estimate_page.click_get_my_estimate()
     estimate_page.verify_sign_in_title()
     estimate_page.enter_sign_in_pass('111')
     estimate_page.click_see_my_estimate()
     estimate_page.verify_address_on_pp()
     time.sleep(2)
Esempio n. 4
0
 def test_first_estimate_button(self):
     main_page = pageobject.MainPage(self.driver)
     estimate_page = pageobject.PropertyCapturePage(self.driver)
     main_page.click_first_estimate_my_property()
     estimate_page.input_address('21 Scotsman Street')
     estimate_page.click_address()
Esempio n. 5
0
 def test_suburb_search(self):
     main_page = pageobject.MainPage(self.driver)
     main_page.enter_property_search_address('222')
Esempio n. 6
0
 def test_logo_navigation(self):
     main_page = pageobject.MainPage(self.driver)
     main_page.click_logo()
     assert main_page.is_title_matched(), 'Not Navigate to OE Homepage'
Esempio n. 7
0
    def test_search_add_modify_basket(self):
        '''
        Test to searching books from BOOKS_LIST,
        add them to a basket,
        save for later Experiences of Test Automation book,
        delete Agile Testing book
        increase quantity of Selenium WebDriver 3 book to 3
        mark all books as gift
        decrease quantity of Selenium WebDriver 3 book to 1
        '''
        # Check if opened page has Amazon in a title of page
        main_page = pageobject.MainPage(self.driver)
        self.assertTrue(main_page.check_title(),
                        "Amazon doesn't appear in the title.")
        # Loop for searching and adding to the basket books from BOOKS_LIST
        for book in BOOKS_LIST:
            # Search book
            main_page.search_for = book
            main_page.do_search()
            # Save result page as a search_result
            search_results = pageobject.SearchResults(self.driver)
            # Check if book appears in result page
            self.assertFalse(search_results.is_no_result(),
                             "Failed to find book: %s" % book)
            # Find the book and open more details page for this book
            search_results.select_book(book)
            book_details = pageobject.DetailsPage(self.driver)
            # Add to the basked selected book
            book_details.add_to_basket()
            self.assertTrue(book_details.is_book_added(),
                            "Failed to add book %s to the basket" % book)
        # Check if amount in basket is as expected
        self.assertIn("3", main_page.items_in_basket(),
                      "Wrong amount of items in the basket")
        # Go to basked page
        book_details.edit_basket()

        basket_page = pageobject.BasketPage(self.driver)
        # Check if all books are listed on cart page
        self.assertEqual(basket_page.AvailableElements(), 3,
                         "Wrong amount of items in the basket")

        # Save for later 1st book from BOOKS_LIST
        basket_page.save_for_later(BOOKS_LIST[0])
        # Wait till item goes to Saved For Later state
        main_page.wait_for_element = PageLocators.SAVED_ITEMS
        self.assertIn("2", main_page.items_in_basket(),
                      "Wrong amount of items in the basket")

        # Take a note of amount of books in basket before deleting
        main_page.text = self.driver.find_element(*PageLocators.BASKET).text
        # Delete 2nd book from BOOKS_LIST
        basket_page.delete(BOOKS_LIST[1])
        # Wait till deleted book appears as deleted item
        main_page.wait_for_element = PageLocators.DELETED_ITEMS
        # Wait for update of amount of basket items
        main_page.wait_for_text_change = PageLocators.BASKET
        self.assertIn("1", main_page.items_in_basket(),
                      "Wrong amount of items in the basket")

        # Change quantity of the only one book in basket
        basket_page.add_quantity(3)
        main_page.wait_for_element = PageLocators.DATA_QUANTITY_3

        # Mark items in basket as a gift
        basket_page.mark_as_gift()
        main_page.wait_for_element = PageLocators.DATA_GIFT_WRAPPED

        # Change back quantity of book
        basket_page.add_quantity(1)
        main_page.wait_for_element = PageLocators.DATA_QUANTITY_1