コード例 #1
0
ファイル: inline-help.py プロジェクト: theaverageguy/ka-lite
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."
コード例 #2
0
ファイル: inline-help.py プロジェクト: BlazingFire/ka-lite
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()
コード例 #3
0
ファイル: inline-help.py プロジェクト: BlazingFire/ka-lite
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)
コード例 #4
0
ファイル: inline-help.py プロジェクト: theaverageguy/ka-lite
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)
コード例 #5
0
ファイル: inline-help.py プロジェクト: theaverageguy/ka-lite
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()
コード例 #6
0
ファイル: learn_content.py プロジェクト: Aypak/ka-lite
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")
コード例 #7
0
ファイル: inline-help.py プロジェクト: BlazingFire/ka-lite
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."
コード例 #8
0
ファイル: inline-help.py プロジェクト: BlazingFire/ka-lite
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."
コード例 #9
0
ファイル: inline-help.py プロジェクト: BlazingFire/ka-lite
def get_modal_step_number(context):
    return int(find_css_class_with_wait(context, STEP_NUMBER_CLASS).text)
コード例 #10
0
ファイル: learn_content.py プロジェクト: yogeshmr/ka-lite
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")
コード例 #11
0
ファイル: inline-help.py プロジェクト: theaverageguy/ka-lite
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."
コード例 #12
0
ファイル: inline-help.py プロジェクト: theaverageguy/ka-lite
def get_modal_step_number(context):
    return int(find_css_class_with_wait(context, STEP_NUMBER_CLASS).text)
コード例 #13
0
ファイル: inline-help.py プロジェクト: zhudy/ka-lite
def step_impl(context):
    elem = find_css_class_with_wait(context, HIGHLIGHTED_CLASS)