def test_guest_can_add_product_to_basket(browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=newYear2019" page = ProductPage(browser, link) page.open_url() page.add_book_to_basket() page.solve_quiz_and_get_code() page.should_be_correct_name_price()
def test_guest_cant_see_success_message_after_adding_product_to_basket( browser): page = ProductPage(browser, link) page.open_url() page.add_book_to_basket() page.should_not_be_success_message()
def test_message_disappeared_after_adding_product_to_basket(browser): page = ProductPage(browser, link) page.open_url() page.add_book_to_basket() page.should_disappear_success_message()