def test_intro_block(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()

    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url)
    time.sleep(3)
    mp_element.sidebar_intro().click()
    time.sleep(2)

    # check that Intro block is displayed
    general_action.check_active_button_in_sidebar(
        'transform: matrix(1, 0, 0, 1, 0, 0);')

    # check block elements
    general_action.check_element_on_page(mp_element.page_title())
    general_action.check_element_on_page(mp_element.tryitnow_button())
    general_action.check_element_on_page(mp_element.howitworks_button())

    # check buttons
    mp_element.tryitnow_button().click()
    general_action.check_url(page_url + '#signup')
    general_action.open_page_by_url(page_url)
    time.sleep(2)

    mp_element.howitworks_button().click()
    time.sleep(2)
    general_action.check_active_button_in_sidebar(
        'transform: matrix(1, 0, 0, 1, 0, -16);')
def test_problem_block(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()

    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    mp_element.sidebar_problem().click()
    time.sleep(2)

    # check that problem block is displayed
    general_action.check_active_button_in_sidebar(
        'transform: matrix(1, 0, 0, 1, 0, -16);')

    # check block elements
    general_action.check_element_on_page(mp_element.howitworks_title())

    general_action.scroll_page('1400')
    time.sleep(2)

    general_action.check_element_on_page(
        mp_element.ten_reason_to_love_button())

    # check button
    mp_element.ten_reason_to_love_button().click()
    general_action.check_url(page_url + '#why')
def test_solution_block(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()

    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    mp_element.sidebar_solution().click()
    time.sleep(2)

    # check that solution block is displayed
    general_action.check_active_button_in_sidebar(
        'transform: matrix(1, 0, 0, 1, 0, -32);')

    # check block elements
    general_action.check_element_on_page(
        mp_element.usability_and_security_title())

    general_action.scroll_page('2400')
    time.sleep(2)

    general_action.check_element_on_page(mp_element.faq_button())

    # check button
    mp_element.faq_button().click()
    general_action.check_url(page_url + '#faq')
Exemplo n.º 4
0
def test_button(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()
    general_action = GeneralActions(fixture_webdriver)
    pricing_element = PricingPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url + '#pricing')

    general_action.click_on_button(pricing_element.try_button())
    general_action.check_url(page_url + '#signup')
def test_hamburger_privacy(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()
    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url)

    mp_element.hamburger_menu_button().click()
    time.sleep(3)

    general_action.check_element_on_page(mp_element.hamburger_privacy())
    mp_element.hamburger_privacy().click()
    general_action.check_url(page_url + '#privacy')
def test_check_elements(fixture_webdriver):
    users_element = UsersPageElements(fixture_webdriver)
    general_actions = GeneralActions(fixture_webdriver)

    UsersPageActions(fixture_webdriver).open_users_page()
    time.sleep(10)

    general_actions.check_url(
        MainPageElements(fixture_webdriver).url() + "#users")
    general_actions.check_element_on_page(users_element.users_title())
    general_actions.check_element_on_page(users_element.list_of_emails())
    general_actions.check_element_on_page(users_element.content_left())
    general_actions.check_element_on_page(users_element.content_right())
def test_general_elements(fixture_webdriver):
    time.sleep(5)
    page_url = MainPageElements(fixture_webdriver).url()

    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)

    # check header elements
    general_action.check_element_on_page(mp_element.logo())
    general_action.check_element_on_page(mp_element.signup_button())
    general_action.check_element_on_page(mp_element.login_button())
    general_action.check_element_on_page(mp_element.hamburger_menu_button())

    # check footer elements
    general_action.check_element_on_page(mp_element.footer_whyus())
    mp_element.footer_whyus().click()
    time.sleep(3)
    general_action.check_url(page_url + '#why')
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    general_action.check_element_on_page(mp_element.footer_company())
    mp_element.footer_company().click()
    time.sleep(3)
    general_action.check_url(page_url + '#about')
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    general_action.check_element_on_page(mp_element.footer_career())
    mp_element.footer_career().click()
    time.sleep(3)
    general_action.check_url(page_url + '#careers')
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    general_action.check_element_on_page(mp_element.footer_faq())
    mp_element.footer_faq().click()
    time.sleep(3)
    general_action.check_url(page_url + '#faq')
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    general_action.check_element_on_page(mp_element.footer_contact())
    mp_element.footer_contact().click()
    time.sleep(3)
    general_action.check_url(page_url + '#contact')
def test_partner_block(fixture_webdriver):
    page_url = MainPageElements(fixture_webdriver).url()
    general_action = GeneralActions(fixture_webdriver)
    mp_element = MainPageElements(fixture_webdriver)
    general_action.open_page_by_url(page_url)
    time.sleep(3)

    mp_element.sidebar_partner().click()
    time.sleep(3)

    # check that partner block is displayed
    general_action.check_active_button_in_sidebar(
        'transform: matrix(1, 0, 0, 1, 0, -64);')

    # check block elements
    general_action.check_element_on_page(mp_element.get_in_touch_title())
    general_action.check_element_on_page(mp_element.meet_team_button())
    general_action.check_element_on_page(mp_element.info_sonikpass_button())

    # check button
    mp_element.meet_team_button().click()
    general_action.check_url(page_url + '#about')