def before_all(context):
    if 'linux' in platform:
        from pyvirtualdisplay import Display
        context.xvfb = Display(visible=0, size=(1366, 768)).start()
    context.save_screenshots = True
    context.close_after_all = True
    context.driver = get_updated_driver()
    context.app_url = APP_URL
def before_all(context):
    if 'linux' in platform:
        from pyvirtualdisplay import Display

        context.xvfb = Display(visible=0, size=(1366, 768)).start()
    else:
        context.save_screenshots = False
        context.close_after_all = False

    context.driver = get_updated_driver()
Beispiel #3
0
def before_all(context):
    if 'linux' in platform:
        from pyvirtualdisplay import Display
        context.xvfb = Display(visible=0, size=(1366, 768)).start()
    else:
        context.save_screenshots = True
        context.close_after_all = False

    context.driver = get_updated_driver()
    context.app_url = APP_URL
    context.created_items = {}
    context.skip_filters = False
    context.skip_sorting = False
    context.skip_slug = False
def step_impl(context, page_name):
    context.page_name = page_name
    page = PAGES_MAP[page_name]
    context.page = page()

    success = None
    while not success:
        try:
            context.page.open()
            success = True
        except TimeoutException:
            print('caught TimeoutException')
            close_driver()
            context.driver = get_updated_driver()

    iframe = getattr(context.page, 'iframe', None)
    if iframe:
        context.driver.switch_to.frame(iframe)

    default_wait_for_page = getattr(context.page, 'default_wait', None)
    if default_wait_for_page:
        default_wait_for_page()