Exemplo n.º 1
0
def verify_error_message(error_message):
    actions.step('Verify that the error {} is displayed'.format(error_message))
    actions.wait_for_element_visible(error_modal)
    errors = elements(css='#errorList>li')
    for error in errors:
        if error.text == error_message:
            return
    raise Exception('Error message {} was not found'.format(error_message))
Exemplo n.º 2
0
def verify_error_message(error_message):
    actions.wait_for_element_visible(error_modal)
    items = elements(error_list_items)
    error_messages = [x.text for x in items]
    actions.capture(
        'verify the application shows the error message: {}'.format(
            error_message))
    if not error_message in error_messages:
        raise Exception(
            'Error message {} is not present'.format(error_message))
Exemplo n.º 3
0
def create_project(project_name):
    actions.click(create_project_button)
    actions.wait_for_element_visible(project_name_input)
    actions.send_keys(project_name_input, project_name)
    actions.click(create_button)
    actions.wait_for_element_not_visible(create_button)