示例#1
0
def step_impl(context, text):
    try:
        page = FilerPage(context)
        assert not find_text_on_collection(
            page.folder_names_column,
            text), "Unexpected folder found: {}!".format(text)
    except Exception as e:
        context.logger.info(e.__cause__)
示例#2
0
def step_impl(context, text):
    try:
        page = FilerPage(context)
        folder_id = None
        for row in page.folder_rows:
            folder_data_name = row.get_attribute(page.folder_data_name_attrib)
            if folder_data_name == text:
                folder_id = findall(
                    '\d+', row.get_attribute(page.folder_data_url_attrib))[0]
                break
        delete_button = page.delete_folder_button.format(folder_id)
        context.driver.find_element_by_css_selector(delete_button).click()
    except Exception as e:
        context.logger.error(e.__cause__)
def step_impl(context):
    try:
        FilerPage(context).new_folder_button.click()
    except Exception as e:
        print(e.__cause__)
示例#4
0
def step_impl(context):
    try:
        page = FilerPage(context)
        page.delete_folder_confirm_button.click()
    except Exception as e:
        context.logger.info(e.__cause__)
示例#5
0
def set_impl(context, text):
    page = FilerPage(context)
    assert find_text_on_collection(page.folder_names_column,
                                   text), "Folder not found!"
示例#6
0
def step_impl(context):
    try:
        page = FilerPage(context)
        visibility_of(page.filer_search_box)
    except Exception as e:
        print(e.__cause__)