コード例 #1
0
 def test_guest_can_go_to_login(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.verify_login_link()
     page.press_login_link()
     login_page = LoginPage(browser)
     login_page.open()
コード例 #2
0
 def test_guest_buy_product2(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
     page.press_view_basket_from_alert()
     basket_page = BasketPage(browser)
     basket_page.verify_page_name()
     basket_page.verify_items_in_basket()
     basket_page.verify_price_of_item()
     basket_page.press_proceed_to_checkout_button()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.fill_required_fields_in_shipping_form()
     shipping_page.press_continue_button()
     payment_page = EnterPaymentDetailsPage(browser)
     payment_page.press_button_continue()
     preview_page = PreviewOrderPage(browser)
     preview_page.verify_address_review()
     preview_page.verify_payment_review()
     preview_page.verify_basket_items_review()
     preview_page.press_place_order_button()
     confirmation_page = OrderConfirmationPage(browser)
     confirmation_page.verify_name_page()
     confirmation_page.verify_address_review()
     confirmation_page.verify_basket_items_review()
     confirmation_page.verify_button_print_page()
コード例 #3
0
 def test_guest_buy_product8(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     basket_page = BasketPage(browser)
     basket_page.open()
     basket_page.verify_page_name()
     basket_page.verify_items_in_basket()
     basket_page.browser.execute_script("window.scrollBy(0, 200);")
     basket_page.verify_shipping_free()
     basket_page.press_proceed_to_checkout_button()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.press_button_ship_to_this_address()
     payment_page = EnterPaymentDetailsPage(browser)
     payment_page.press_button_continue()
     preview_page = PreviewOrderPage(browser)
     preview_page.verify_address_review()
     preview_page.verify_payment_review()
     preview_page.verify_basket_items_review()
     preview_page.press_place_order_button()
     confirmation_page = OrderConfirmationPage(browser)
     confirmation_page.verify_name_page()
     confirmation_page.verify_address_review()
     confirmation_page.verify_basket_items_review()
     confirmation_page.verify_button_print_page()
コード例 #4
0
 def test_guest_buy_product6(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.add_to_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()
     checkout_page = CheckoutPage(browser)
     checkout_page.fill_email_in_checkout_guest()
     checkout_page.new_customer_button_checked()
     checkout_page.fill_password_guest()
     checkout_page.button_continue()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.fill_all_fields_in_shipping_form()
     shipping_page.press_continue_button()
     payment_page = EnterPaymentDetailsPage(browser)
     payment_page.press_button_continue()
     preview_page = PreviewOrderPage(browser)
     preview_page.verify_address_review()
     preview_page.verify_payment_review()
     preview_page.verify_basket_items_review()
     preview_page.press_place_order_button()
     confirmation_page = OrderConfirmationPage(browser)
     confirmation_page.verify_name_page()
     confirmation_page.verify_address_review()
     confirmation_page.verify_basket_items_review()
     confirmation_page.verify_button_print_page()
コード例 #5
0
 def test_change_language(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.change_language_to_it()
     page.verify_change_language_to_it(
         TestAllProductsPageForGuest.menu_it,
         TestAllProductsPageForGuest.basket_it)
コード例 #6
0
 def test_verify_alerts_of_add_to_basket(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.add_to_basket_button()
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
コード例 #7
0
 def test_user_go_to_user_page_by_press_icon(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.verify_account_icon()
     page.press_account_icon()
     login_page = LoginPage(browser)
     login_page.open()
コード例 #8
0
 def test_change_language(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.change_language_to_it()
     page.verify_change_language_to_it(
         TestAllProductsPageForRegisteredUser.menu_it,
         TestAllProductsPageForRegisteredUser.basket_it)
コード例 #9
0
 def test_verify_alerts_of_add_to_basket(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     page.browser.execute_script("window.scrollBy(0, 100);")
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
コード例 #10
0
 def test_go_to_next_page_and_back(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.press_next_button()
     next_page = AllProductsPage2(browser)
     next_page.verify_page_name()
     next_page.verify_next_page()
     next_page.verify_previous_button()
     next_page.press_previous_button()
     page = AllProductsPage(browser)
     page.open()
コード例 #11
0
 def test_verify_menu(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.verify_menu_block()
     page.verify_menu_clothing_link()
     page.verify_menu_books_link()
     page.verify_menu_fiction()
     page.verify_menu_computers()
     page.verify_menu_non_fiction()
     page.verify_menu_programming()
     page.verify_menu_hacking()
コード例 #12
0
 def test_guest_buy_product6(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
     page.press_checkout_from_alert()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.press_return_to_basket()
     basket_page = BasketPage(browser)
     basket_page.open()
コード例 #13
0
 def test_guest_buy_product5(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.add_to_basket_button()
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
     page.press_checkout_from_alert()
     checkout_page = CheckoutPage(browser)
     checkout_page.fill_email_in_checkout_guest()
     checkout_page.new_customer_button_checked()
     checkout_page.fill_password_guest()
     checkout_page.button_continue()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.press_return_to_basket()
コード例 #14
0
 def test_guest_buy_product5(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     page.verify_alert1_of_add_to_basket()
     page.verify_alert2_of_add_to_basket()
     page.verify_alert3_of_add_to_basket()
     page.press_checkout_from_alert()
     shipping_page = ShippingAddressPage(browser)
     shipping_page.press_button_ship_to_this_address()
     payment_page = EnterPaymentDetailsPage(browser)
     payment_page.press_button_continue()
     preview_page = PreviewOrderPage(browser)
     preview_page.verify_address_review()
     preview_page.verify_payment_review()
     preview_page.verify_basket_items_review()
     preview_page.press_place_order_button()
     confirmation_page = OrderConfirmationPage(browser)
     confirmation_page.verify_name_page()
     confirmation_page.verify_address_review()
     confirmation_page.verify_basket_items_review()
     confirmation_page.verify_button_print_page()
コード例 #15
0
 def test_press_add_to_basket_button(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.add_to_basket_button()
コード例 #16
0
 def test_verify_next_button(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.verify_next_button()
コード例 #17
0
 def test_verify_name_page(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.verify_page_name()
コード例 #18
0
 def test_verify_page_structure(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.verify_menu_block()
     page.verify_product_block()
コード例 #19
0
 def test_press_item_image(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.browser.execute_script("window.scrollBy(0, 200);")
     page.press_item_image()
コード例 #20
0
 def test_press_checkout_from_alert(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.add_to_basket_button()
     page.press_checkout_from_alert()
コード例 #21
0
 def test_press_view_basket_from_alert(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.add_to_basket_button()
     page.press_view_basket_from_alert()
コード例 #22
0
 def test_verify_item_link(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.browser.execute_script("window.scrollBy(0, 200);")
     time.sleep(5)
     page.verify_item_link(TestAllProductsPageForGuest.product_item1)
コード例 #23
0
 def test_user_go_to_user_page_by_press_link(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.verify_account_link()
     page.press_account_link()
コード例 #24
0
 def test_user_logout(self, browser):
     page = AllProductsPage(browser)
     page.open()
     page.user_in_system()
     page.verify_logout_link()
     page.press_logout_link()