コード例 #1
0
def test_guest_cant_see_success_message_after_adding_product_to_basket(
        browser):
    link = "http://selenium1py.pythonanywhere.com/ru/catalogue/the-shellcoders-handbook_209/"
    page = ProductPage(browser, link)
    page.open()
    page.add_to_card()
    page.should_not_be_success_message()
コード例 #2
0
def test_guest_can_add_product_to_cart(browser):
    link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
    page = ProductPage(browser, link)
    page.open()
    page.add_to_card()
    page.should_contains_product_name_in_success_message(
        page.product_name(), page.success_message())
    page.should_contains_product_price_in_basket_total(page.product_price(),
                                                       page.basket_message())
コード例 #3
0
def test_guest_can_add_product_to_basket(browser, link):
    link = f"{link}"
    page = ProductPage(browser, link)
    page.open()
    page.add_to_card()
    page.solve_quiz_and_get_code()
    page.message_add_to_card_show()
    page.name_of_product()
    page.message_about_prise()
    page.price_of_product()
コード例 #4
0
 def test_user_can_add_product_to_basket(self, browser):
     #link = f"{link}" #http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=newYear2019"
     link = "http://selenium1py.pythonanywhere.com/ru/catalogue/the-shellcoders-handbook_209/"
     page = ProductPage(browser, link)
     page.open()
     page.add_to_card()
     page.message_add_to_card_show()
     page.name_of_product()
     page.message_about_prise()
     page.price_of_product()
コード例 #5
0
def test_guest_can_add_product_to_cart(browser, link):
    page = ProductPage(browser, link)
    page.open()
    page.should_not_be_success_message()
    page.add_to_card()
    page.solve_quiz_and_get_code()
    page.should_contains_product_name_in_success_message(
        page.product_name(), page.success_message())
    page.should_contains_product_price_in_basket_total(page.product_price(),
                                                       page.basket_message())
コード例 #6
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-shellcoders-handbook_209/"
    page = ProductPage(browser, link)
    page.open()
    page.add_to_card()
    page.shod_be_disappeared()
コード例 #7
0
def test_guest_can_add_product_to_basket(browser):
    page = ProductPage(browser, base_url)
    page.open()
    page.add_to_card()
    page.is_book_added()
コード例 #8
0
 def test_user_can_add_product_to_basket(self, browser):
     page = ProductPage(browser, product_link)
     page.open()
     page.add_to_card()
     page.is_book_added()
コード例 #9
0
def test_guest_can_add_product_to_basket(browser, link):
    #link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=newYear2019'
    page = ProductPage(browser, link)
    page.open()
    page.add_to_card()
    page.should_be_success_msg()