Example #1
0
def test_message_disappeared_after_adding_product_to_cart(browser):
    link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/hacking-exposed-wireless_208/"
    cart = ProductPage(browser, link)
    cart.open()
    cart.add_to_backet()
    cart.should_be_disappeared_success_message()
Example #2
0
 def test_user_cant_see_success_message(self, browser):
     link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/?promo=newYear2019'
     page = ProductPage(browser, link)
     page.open()
     page.should_not_be_successful_message()
 def test_guest_can_go_to_login_page_from_product_page(self, browser):
     link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     page = ProductPage(browser, link)
     page.open()
     page.go_to_login_page()
Example #4
0
def test_guest_cant_see_success_message(browser):
    page = ProductPage(browser, link)
    page.open()
    page.should_not_be_success_message()
Example #5
0
def test_guest_should_see_login_link_on_product_page(browser):
    page = ProductPage(browser, link)
    page.open()
    page.should_be_login_link()
Example #6
0
 def test_guest_should_see_login_link_on_product_page(self, browser, page):
     link = f"{page}"
     page = ProductPage(browser, link)
     page.open()
     page.should_be_login_link()
Example #7
0
 def test_guest_cant_see_success_message(self, browser, page):
     link = f"{page}"
     page = ProductPage(browser, link)
     page.open()
     page.should_not_be_success_message()
def test_guest_cant_see_success_message(browser):
    product_url = 'http://selenium1py.pythonanywhere.com/catalogue/the-shellcoders-handbook_209/?promo=newYear'
    page = ProductPage(browser, product_url)
    page.open()
    page.should_not_be_success_message()
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.should_be_match_name()
def test_guest_cant_see_product_in_basket_opened_from_product_page(browser):
    product_page = ProductPage(browser, BASE_URL + path)
    product_page.open()
    product_page.should_be_add_to_basket_button()
    product_page.click_add_to_basket_button()
Example #11
0
def test_guest_cant_see_success_message(browser):
    link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
    page = ProductPage(browser, link)
    page.open()
    page.should_not_be_success_message()
def test_user_can_add_product_to_basket(browser):
    setup_user_register(browser)
    product_page = ProductPage(browser, BASE_URL + path)
    product_page.open()
    product_page.should_be_add_to_basket_button()
    product_page.click_add_to_basket_button()
def test_guest_can_add_product_to_basket(browser):
    product_page = ProductPage(browser, BASE_URL + path)
    product_page.open()
    product_page.should_be_add_to_basket_button()
    product_page.click_add_to_basket_button()
def test_guest_can_go_to_login_page_from_product_page(browser):
    product_page = ProductPage(browser, BASE_URL + path)
    product_page.open()
    product_page.product_can_be_added_to_basket()
Example #15
0
def test_guest_should_see_login_link_on_product_page(browser):
    link = "http://selenium1py.pythonanywhere.com/catalogue/" \
           "coders-at-work_207"
    page = ProductPage(browser=browser, url=link)
    page.open()
    page.should_be_login_link()
 def test_user_can_add_product_to_basket(self, browser):
     link = 'http://selenium1py.pythonanywhere.com/ru/catalogue/hacking-exposed-wireless_208/'
     product_page = ProductPage(browser, link)
     product_page.open()
     product_page.add_item_to_cart()
Example #17
0
def product_page(request, driver, url):
    product_page = ProductPage(driver, url, **request.param)
    product_page.open()
    return product_page
def test_message_disappeared_after_adding_product_to_basket(browser):
    link = 'http://selenium1py.pythonanywhere.com/ru/catalogue/hacking-exposed-wireless_208/'
    product_page = ProductPage(browser, link)
    product_page.open()
    product_page.add_item_to_cart()
    product_page.success_message_disappeared_after_adding_product_to_cart()
Example #19
0
 def test_guest_can_go_to_login_page_from_product_page(self, browser, page):
     link = f"{page}"
     page = ProductPage(browser, link)
     page.open()
     page.go_to_login_page()
 def test_user_cant_see_success_message(self, browser):
     link = 'http://selenium1py.pythonanywhere.com/ru/catalogue/hacking-exposed-wireless_208/'
     product_page = ProductPage(browser, link)
     product_page.open()
     product_page.success_message_should_not_be_seen_without_adding_product_to_cart(
     )
 def test_user_cant_see_success_message(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/the-shellcoders-handbook_209/?promo=newYear"
     product_page = ProductPage(browser, link)
     product_page.open()
     product_page.should_not_be_success_message()
 def __init__(self):
     self.driver = webdriver.Chrome()
     self.start_page = StartPage(self.driver)
     self.product_page = ProductPage(self.driver)
     self.base_page = BasePage(self.driver)
     self.cart_page = CartPage(self.driver)
Example #23
0
def test_message_disappeared_after_adding_product_to_basket(browser):
    page = ProductPage(browser, link)
    page.open()
    page.should_be_added_to_basket()
    page.should_disappeared_success_message()
Example #24
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.guest_can_add_product_to_basket()
Example #25
0
def test_guest_can_go_to_login_page_from_product_page(browser):
    page = ProductPage(browser, link)
    page.open()
    page.go_to_login_page()
def open_product_page(browser, link):
    page = ProductPage(browser, link)
    page.open()
    return page
 def test_guest_should_see_login_link_on_product_page(self, browser, link):
     link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/"
     page = ProductPage(browser, link)
     page.open()
     page.should_be_login_link()
Example #28
0
 def test_user_cant_see_success_message(self, browser):
     link = "http://selenium1py.pythonanywhere.com/catalogue/" \
            "coders-at-work_207"
     page = ProductPage(browser, link)
     page.open()
     page.should_not_be_success_message()
 def test_guest_cant_see_success_message_after_adding_product_to_basket(
         self, browser, link):
     product_page = ProductPage(browser, link)
     product_page.open()
     product_page.product_add_to_basket()
     product_page.should_not_be_success_message()
Example #30
0
def test_guest_cant_see_success_message_after_adding_product_to_cart(browser):
    link = 'http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207'
    cart = ProductPage(browser, link)
    cart.open()
    cart.add_to_backet()
    cart.should_not_be_success_message()