Did I find the right examples for you? yes no

All Samples(19)  |  Call(19)  |  Derive(0)  |  Import(0)

src/a/g/agile-django-HEAD/agile/features/steps.py   agile-django(Download)
def see_the_form_field(step, field_name):
    found = world.wait_for_many_elements('select[name=%s], input[name=%s]' % (field_name, field_name))
    assert found, 'no form fields named "%s" were found' % field_name
 
@step('see the link "(.+)"')
def wait_for_element(selector, timeout=5, interval=0.5, dont_fail=False):
    try:
        found = world.wait_for_many_elements(selector, timeout, interval)
    except AssertionError:
        if dont_fail:
def wait_until_visible(selector, timeout=5, interval=0.5):
    found = world.wait_for_many_elements(selector, timeout, interval)
    def element_become_visible():
        sel = 'jQuery("{0}:visible").length'.format(selector)
        return int(world.browser.evaluate_script(sel)) > 0
def wait_until_hidden(selector, timeout=5, interval=0.5):
    found = world.wait_for_many_elements(selector, timeout, interval)
    def element_become_hidden():
        sel = 'jQuery("{0}:visible").length'.format(selector)
        return int(world.browser.evaluate_script(sel)) == 0

src/a/g/agile-django-HEAD/agile/features/details_steps.py   agile-django(Download)
def see_the_board_of_stories(step):
    found = world.wait_for_many_elements('.stories, .ui-sortable', 5, 0.5)
    assert found, 'There is no board of stories'
 
@step(u'display the hidden phases')
def display_the_hidde_phases(step):
    buttons = world.wait_for_many_elements(".left-shows, .right-shows", 5, 0.5)
def see_the_story_form(step, form):
    found = world.wait_for_many_elements('#add-story-dialog', 5, 0.5)
    assert found, 'The %s Story Form was not found' % form.capitalize()
 
@step(u'click the menu phase')
def see_the_message_of_incorrect(step):
    message = world.wait_for_many_elements('.story-taken-message', 5, 0.5)
    assert message, 'There is not the story taken message'

src/a/g/agile-django-HEAD/agile/features/story_tags_steps.py   agile-django(Download)
    step.then('click on the link "Projects"')
    step.then('click on a project')
    stories = world.wait_for_many_elements('.story a', 5, 0.5)
    world.browser.visit('http://localhost:8000/project/1/story/4')
    tags = world.wait_for_many_elements('#tags', 5, 0.5)

src/a/g/agile-django-HEAD/agile/features/phases_steps.py   agile-django(Download)
def click_on_a_project(step):
    projects = world.wait_for_many_elements("#projects ul li a")
    assert projects, 'There are no projects.'
    projects[0].click()
 
    def ensure_dialog_loads():
        world.browser.execute_script('$(".phase-controls").css'
                                     '("visibility","visible")')
        button = world.wait_for_many_elements('div.phase button')[number * 2 - 3 + nth]
        assert button, 'There is no %s button for phase %s' % (button_name, number)
        value = data['value']
        is_input = world.wait_for_many_elements(
                        '#%s-phase-dialog input[name=%s]' % (form, name))
        if is_input:
            is_input.first.value = value
            continue
 
        is_select = world.wait_for_many_elements(
                        '#%s-phase-dialog select[name=%s]' % (form, name))
        name = data['name']
        value = data['value']
        is_input = world.wait_for_many_elements('div#edit-phase-dialog ' +
                                             'input[name=%s]' % name)
        if is_input: