Ejemplo n.º 1
0
def step_impl(context):
    modal = find_css_class_with_wait(context, MODAL_CLASS)
    assert modal is not None, "Couldn't find an intro modal!"
    context.next_button = next_button = modal.find_element_by_class_name(
        NEXT_BUTTON_CLASS)
    assert next_button.is_displayed(
    ), "\"Next\" button exists but is not visible."
Ejemplo n.º 2
0
def step_impl(context):
    elem = find_css_class_with_wait(context, STEP_NUMBER_CLASS)
    actions = ActionChains(context.browser)
    # Move the mouse postion to the top left of the element, and
    # then offset the position. Should lay outside of the element.
    actions.move_to_element_with_offset(elem, -50, -50)
    actions.click()
    actions.peform()
Ejemplo n.º 3
0
def step_impl(context):
    """ Start the intro and add some elements to the context. """
    go_to_manage_page(context)
    start_intro(context)
    modal = context.modal = find_css_class_with_wait(context, MODAL_CLASS)
    context.skip_button = modal.find_element_by_class_name(SKIP_BUTTON_CLASS)
    context.next_button = modal.find_element_by_class_name(NEXT_BUTTON_CLASS)
    context.back_button = modal.find_element_by_class_name(BACK_BUTTON_CLASS)
Ejemplo n.º 4
0
def step_impl(context):
    """ Start the intro and add some elements to the context. """
    go_to_manage_page(context)
    start_intro(context)
    modal = context.modal = find_css_class_with_wait(context, MODAL_CLASS)
    context.skip_button = modal.find_element_by_class_name(SKIP_BUTTON_CLASS)
    context.next_button = modal.find_element_by_class_name(NEXT_BUTTON_CLASS)
    context.back_button = modal.find_element_by_class_name(BACK_BUTTON_CLASS)
Ejemplo n.º 5
0
def step_impl(context):
    elem = find_css_class_with_wait(context, STEP_NUMBER_CLASS)
    actions = ActionChains(context.browser)
    # Move the mouse postion to the top left of the element, and
    # then offset the position. Should lay outside of the element.
    actions.move_to_element_with_offset(elem, -50, -50)
    actions.click()
    actions.peform()
Ejemplo n.º 6
0
def impl(context):
    # Wait for .content, a rule-of-thumb for ajax stuff to finish, and thus for .alerts to appear (if any).
    find_css_class_with_wait(context, "content")
    assert_no_element_by_css_selector(context, ".alert")
Ejemplo n.º 7
0
def step_impl(context):
    modal = find_css_class_with_wait(context, MODAL_CLASS)
    assert modal is not None, "Couldn't find an intro modal!"
    context.next_button = next_button = modal.find_element_by_class_name(NEXT_BUTTON_CLASS)
    assert next_button.is_displayed(), "\"Next\" button exists but is not visible."
Ejemplo n.º 8
0
def step_impl(context):
    elem = find_css_class_with_wait(context, HIGHLIGHTED_CLASS)
    assert elem is not None, "Couldn't find a highlighted element on the page."
    assert elem.is_displayed(), "The highlighted element exists but is not visible."
Ejemplo n.º 9
0
def get_modal_step_number(context):
    return int(find_css_class_with_wait(context, STEP_NUMBER_CLASS).text)
Ejemplo n.º 10
0
def impl(context):
    # Wait for .content, a rule-of-thumb for ajax stuff to finish, and thus for .alerts to appear (if any).
    find_css_class_with_wait(context, "content")
    assert_no_element_by_css_selector(context, ".alert")
Ejemplo n.º 11
0
def step_impl(context):
    elem = find_css_class_with_wait(context, HIGHLIGHTED_CLASS)
    assert elem is not None, "Couldn't find a highlighted element on the page."
    assert elem.is_displayed(
    ), "The highlighted element exists but is not visible."
Ejemplo n.º 12
0
def get_modal_step_number(context):
    return int(find_css_class_with_wait(context, STEP_NUMBER_CLASS).text)
Ejemplo n.º 13
0
def step_impl(context):
    elem = find_css_class_with_wait(context, HIGHLIGHTED_CLASS)