def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/hacking-exposed-wireless_208/"
     page = ProductPage(browser, link)
     page.open()
     page.add_to_basket()
     page.compare_name()
     page.compare_price()
Exemplo n.º 2
0
 def test_user_can_add_product_to_basket(self, browser):
     page = ProductPage(browser, self.LINK)
     page.open()
     page.add_to_basket()
     page.should_be_product_in_the_basket()
     page.should_be_proper_product_name_in_the_basket()
     page.should_be_proper_product_price_in_the_basket()
Exemplo n.º 3
0
def test_guest_can_add_product_to_basket(browser, link):
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.confirmation_message_correct()
    page.basket_total_correct()
Exemplo n.º 4
0
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()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.should_be_add_to_basket_message()
Exemplo n.º 5
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
    product_page = ProductPage(browser, link)
    product_page.open()
    product_page.add_to_basket()
    time.sleep(1)
    product_page.should_be_disappeared_message()
 def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=offer0"
     page = ProductPage(browser, link)
     page.open()
     page.add_to_basket()
     page.solve_quiz_and_get_code()
     page.is_succeses_alert_present()
 def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207"
     product_page = ProductPage(browser, link)
     product_page.open()
     product_page.add_to_basket()
     product_page.should_be_book_name()
     product_page.should_be_book_price()
Exemplo n.º 8
0
def test_guest_can_add_product_to_basket(browser, url):
    page = ProductPage(browser, url)
    page.open()
    page.should_be_button_add_to_basket()
    page.add_to_basket()
    page.should_be_cost_equal()
    page.should_be_name_equal()
 def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_209/"
     page = ProductPage(browser, link)
     page.open()
     page.add_to_basket()
     page.should_be_product_in_basket()
     page.should_be_right_basket_total()
Exemplo n.º 10
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = "http://selenium1py.pythonanywhere.com/ru/catalogue/the-shellcoders-handbook_209/?promo=newYear"
    product_page = ProductPage(browser, link)
    product_page.open()
    product_page.add_to_basket()
    product_page.solve_quiz_and_get_code()
    product_page.success_message_should_disappear()
Exemplo n.º 11
0
 def test_user_can_add_product_to_basket(self, browser):
     page = ProductPage(browser, based_link)
     page.open()
     page.should_be_button_add_to_basket()
     page.add_to_basket()
     page.should_be_cost_equal()
     page.should_be_name_equal()
def test_guest_can_add_product_to_basket(browser,link):
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    time.sleep(2)
    page.solve_quiz_and_get_code()
    page.get_name_of_product()
def test_guest_can_add_product_to_basket(browser, link):
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.check_name_product_in_string_basket()
    page.check_price_product_in_price_basket()
Exemplo n.º 14
0
def test_guest_can_add_product_to_basket(browser, offers):
    page = ProductPage(browser, BASE_URL + PRODUCT_URL + offers)
    page.open()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.are_prices_equal_on_success()
    page.are_names_equal_on_success()
def test_guest_cant_see_success_message_after_adding_product_to_basket(browser, link):
    page = ProductPage(browser, link)
    page.open()
    product_page = ProductPage(browser, browser.current_url)
    product_page.add_to_basket()
    product_page.solve_quiz_and_get_code()
    product_page.should_not_be_success_message()
Exemplo n.º 16
0
def test_guest_can_add_product_to_cart(browser, link):
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.should_be_message_basket_item()
    page.should_be_message_basket_price()
def test_guest_can_add_product_to_basket(browser,link):
    page = ProductPage(browser, link)
    page.open()
    page.should_be_add_to_basket_btn()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    page.should_item_be_in_basket()
Exemplo n.º 18
0
def test_guest_can_add_product_to_cart(browser):
    page = ProductPage(browser, link)
    page.open()
    page_product = ProductPage(browser, browser.current_url)
    page_product.add_to_basket()
    page_product.solve_quiz_and_get_code()
    page_product.should_message_basket()
 def test_user_can_add_product_to_basket(self, app):
     page = ProductPage(app, COMMON_PRODUCT_LINK)
     page.open()
     page.add_to_basket()
     page.check_product_was_added()
     product_price = page.price_of_product()
     page.check_total_price(product_price)
Exemplo n.º 20
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.solve_quiz_and_get_code()
    # time.sleep(1)
    page.must_disappear()
def test_guest_can_add_product_to_basket(browser, link):
    product_page = ProductPage(browser, link)
    product_page.open()
    product_page.add_to_basket()
    product_page.solve_quiz_and_get_code()
    product_page.should_be_book_name()
    product_page.should_be_book_price()
Exemplo n.º 22
0
 def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     page = ProductPage(browser, link)
     page.open()
     page_product = ProductPage(browser, browser.current_url)
     page_product.add_to_basket()
     page.should_message_basket()
Exemplo n.º 23
0
class TestUserAddToBasketFromProductPage():
    @pytest.fixture(scope="function", autouse=True)
    def setup(self, browser):
        link = "http://selenium1py.pythonanywhere.com/en-gb/accounts/login/"
        self.login_page = LoginPage(browser, link)
        self.login_page.open()
        count = random.randint(1, 100)
        email = str(time.time()) + "@fakemail.org"
        password = str(time.time() + count)
        self.login_page.register_new_user(email, password)
        self.login_page.should_be_authorized_user()

    def test_user_cant_see_success_message(self, browser):
        link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
        self.product_page = ProductPage(browser, link)
        self.product_page.open()
        self.product_page.should_not_be_success_message()

    @pytest.mark.need_review
    def test_user_can_add_product_to_basket(self, browser):
        link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
        self.product_page = ProductPage(browser, link)
        self.product_page.open()
        self.product_page.add_to_basket()
        self.product_page.should_be_add_to_basket_message()
Exemplo n.º 24
0
 def test_user_can_add_product_to_basket(self, browser):
     link = product_link
     page = ProductPage(browser, link)
     page.open()
     page.add_to_basket()
     page.should_match_product_name()
     page.should_match_product_price()
Exemplo n.º 25
0
def test_guest_can_add_product_to_basket(browser, link):
    product_page = ProductPage(browser, link)
    product_page.open()
    product_page.add_to_basket()
    product_page.solve_quiz_and_get_code()
    product_page.check_success_adding_message("Coders at Work")
    product_page.check_cart_total_message("19.99")
Exemplo n.º 26
0
def test_guest_cant_see_success_message_after_adding_product_to_basket(
        browser):
    link = product_link
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.should_not_be_success_message()
Exemplo n.º 27
0
def test_guest_cant_see_success_message_after_adding_product_to_basket(
        browser):
    link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.should_not_be_success_message()
def test_guest_cant_see_success_message_after_adding_product_to_basket(
        browser):
    link = UsedUrls.PRODUCT_THE_CITY_AND_THE_STARS_95_URL
    page = ProductPage(browser, link)
    page.open()
    page.add_to_basket()
    page.should_not_be_success_message()
Exemplo n.º 29
0
 def test_user_can_add_product_to_basket(self, browser):
     link = "http://selenium1py.pythonanywhere.com/ru/catalogue/the-shellcoders-handbook_209/"
     page = ProductPage(browser, link)
     page.open()
     page.add_to_basket()
     page.confirmation_message_correct()
     page.basket_total_correct()
Exemplo n.º 30
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = "http://selenium1py.pythonanywhere.com/catalogue/" \
           "coders-at-work_207"
    page = ProductPage(browser=browser, url=link)
    page.open()
    page.add_to_basket()
    page.should_be_success_message_disappeared()