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."
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()
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)
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")
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."
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."
def get_modal_step_number(context): return int(find_css_class_with_wait(context, STEP_NUMBER_CLASS).text)
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."
def step_impl(context): elem = find_css_class_with_wait(context, HIGHLIGHTED_CLASS)