示例#1
0
 def test_buy_product_from_main_page(self, browser):
     page = MainPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_from_main_page()
     page.press_basket_button()
     basket_page = BasketPage(browser)
     basket_page.open()
     basket_page.verify_page_name()
     basket_page.verify_items_in_basket()
     basket_page.verify_shipping_free()
     basket_page.press_proceed_to_checkout_button()
     shipping_address_page = ShippingAddressPage(browser)
     shipping_address_page.open()
     shipping_address_page.fill_all_fields_in_shipping_form()
     shipping_address_page.press_continue_button()
     enter_payment_details_page = EnterPaymentDetailsPage(browser)
     enter_payment_details_page.open()
     enter_payment_details_page.verify_name_page()
     enter_payment_details_page.press_button_continue()
     preview_order_page = PreviewOrderPage(browser)
     preview_order_page.open()
     preview_order_page.verify_name_page()
     preview_order_page.verify_address_review()
     preview_order_page.verify_payment_review()
     preview_order_page.verify_basket_items_review()
     preview_order_page.press_place_order_button()
     order_confirmation_page = OrderConfirmationPage(browser)
     order_confirmation_page.open()
     order_confirmation_page.verify_name_page()
     order_confirmation_page.verify_address_review()
     order_confirmation_page.verify_basket_items_review()
     order_confirmation_page.verify_button_print_page()
     order_confirmation_page.verify_continue_shopping()
示例#2
0
 def test_buy_product_from_main_page_2(self, browser):
     page = MainPage(browser)
     page.open()
     page.add_to_basket_from_main_page()
     page.press_basket_button()
     basket_page = BasketPage(browser)
     basket_page.open()
     basket_page.verify_page_name()
     basket_page.verify_items_in_basket()
     basket_page.verify_price_of_item()
     basket_page.verify_shipping_free()
     basket_page.verify_price_the_city_and_the_stars()
     basket_page.press_proceed_to_checkout_button()
     checkout_page = CheckoutPage(browser)
     checkout_page.open()
     checkout_page.fill_email_in_checkout_guest()
     checkout_page.new_customer_button_checked()
     checkout_page.fill_password_guest()
     checkout_page.button_continue()
     shipping_address_page = ShippingAddressPage(browser)
     shipping_address_page.open()
     shipping_address_page.fill_required_fields_in_shipping_form()
     shipping_address_page.press_continue_button()
     enter_payment_details_page = EnterPaymentDetailsPage(browser)
     enter_payment_details_page.open()
     enter_payment_details_page.verify_name_page()
     enter_payment_details_page.press_button_continue()
     preview_order_page = PreviewOrderPage(browser)
     preview_order_page.open()
     preview_order_page.verify_name_page()
     preview_order_page.verify_address_review()
     preview_order_page.verify_payment_review()
     preview_order_page.verify_basket_items_review()
     preview_order_page.press_place_order_button()
     order_confirmation_page = OrderConfirmationPage(browser)
     order_confirmation_page.open()
     order_confirmation_page.verify_name_page()
     order_confirmation_page.verify_address_review()
     order_confirmation_page.verify_basket_items_review()
     order_confirmation_page.verify_button_print_page()
     order_confirmation_page.verify_continue_shopping()