def generate_ui_test_task(dependencies, engine='Klar', device='ARM'):
    '\n    :param str engine: Klar, Webview\n    :param str device: ARM, X86\n    :return: uiWebviewARMTestTaskId, uiWebviewARMTestTask\n    '
    if (engine is 'Klar'):
        engine = 'geckoview'
        assemble_engine = engine
    elif (engine is 'Webview'):
        engine = 'webview'
        assemble_engine = 'Focus'
    else:
        raise Exception('ERROR: unknown engine type --> Aborting!')
    task_name = '(Focus for Android) UI tests - {0} {1}'.format(engine, device)
    task_description = 'Run UI tests for {0} {1} build for Android.'.format(engine, device)
    build_dir = 'assemble{0}{1}Debug'.format(assemble_engine, device.capitalize())
    build_dir_test = 'assemble{0}{1}DebugAndroidTest'.format(assemble_engine, device.capitalize())
    print('BUILD_DIR: {0}'.format(build_dir))
    print('BUILD_DIR_TEST: {0}'.format(build_dir_test))
    device = device.lower()
    return (taskcluster.slugId(), generate_task(name=task_name, description=task_description, command=((((((('echo "--" > .adjust_token && ./gradlew --no-daemon clean ' + build_dir) + ' ') + build_dir_test) + '  && ./tools/taskcluster/google-firebase-testlab-login.sh && tools/taskcluster/execute-firebase-tests.sh ') + device) + ' ') + engine), dependencies=dependencies, scopes=['secrets:get:project/focus/firebase'], routes=['notify.irc-channel.#android-ci.on-any'], artifacts={'public': {'type': 'directory', 'path': '/opt/focus-android/test_artifacts', 'expires': taskcluster.stringDate(taskcluster.fromNow('1 week'))}}))
:param str engine: Klar, Webview
:param str device: ARM, X86
:return: uiWebviewARMTestTaskId, uiWebviewARMTestTask
def generate_ui_test_task(dependencies, engine='Klar', device='ARM'):
    '\n    :param str engine: Klar, Webview\n    :param str device: ARM, X86\n    :return: uiWebviewARMTestTaskId, uiWebviewARMTestTask\n    '
    if (engine is 'Klar'):
        engine = 'geckoview'
        assemble_engine = engine
    elif (engine is 'Webview'):
        engine = 'webview'
        assemble_engine = 'Focus'
    else:
        raise Exception('ERROR: unknown engine type --> Aborting!')
    task_name = '(Focus for Android) UI tests - {0} {1}'.format(engine, device)
    task_description = 'Run UI tests for {0} {1} build for Android.'.format(engine, device)
    build_dir = 'assemble{0}{1}Debug'.format(assemble_engine, device.capitalize())
    build_dir_test = 'assemble{0}{1}DebugAndroidTest'.format(assemble_engine, device.capitalize())
    print('BUILD_DIR: {0}'.format(build_dir))
    print('BUILD_DIR_TEST: {0}'.format(build_dir_test))
    device = device.lower()
    return (taskcluster.slugId(), generate_task(name=task_name, description=task_description, command=((((((('echo "--" > .adjust_token && ./gradlew --no-daemon clean ' + build_dir) + ' ') + build_dir_test) + '  && ./tools/taskcluster/google-firebase-testlab-login.sh && tools/taskcluster/execute-firebase-tests.sh ') + device) + ' ') + engine), dependencies=dependencies, scopes=['secrets:get:project/focus/firebase'], routes=['notify.irc-channel.#android-ci.on-any'], artifacts={'public': {'type': 'directory', 'path': '/opt/focus-android/test_artifacts', 'expires': taskcluster.stringDate(taskcluster.fromNow('1 week'))}}))