コード例 #1
0
 def test_user_can_add_product_to_basket(self, browser):
     link = f"http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     pages = AddInBasket(browser, link)
     pages.open()
     pages.add_in_basket()
     base_page = BasePage(browser, link)
     base_page.solve_quiz_and_get_code()
     pages.AssertFinishText()
コード例 #2
0
def test_guest_can_add_product_to_basket(browser, offers):
    link = f"http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=offer{offers}"
    pages = AddInBasket(browser, link)
    pages.open()
    pages.add_in_basket()
    base_page = BasePage(browser, link)
    base_page.solve_quiz_and_get_code()
    pages.AssertFinishText()