<commit_before>*** Settings ***
Library           AppiumLibrary    run_on_failure=Capture Screenshot On Failure

*** Variables ***
${SCREENSHOTS}                  ${PROJECTROOT}${/}screenshots${/}

${REMOTE_URL}                   http://localhost:4723/wd/hub
${AUTOMATION_NAME}              appium
${IOS_AUTOMATION_NAME}          XCUITest

${PLATFORM_NAME_ANDROID}        Android
${PLATFORM_VERSION_ANDROID}     6.0.1   # Uncomment this from the 'Open Application' keyword if you want to be spesific
${DEVICE_NAME_ANDROID}          Android Emulator
${APP_ANDROID}                  ${CURDIR}${/}app${/}BitbarSampleApp.apk
#${APP_ANDROID}                  ${PROJECTROOT}${/}application.apk    # Uncomment for cloud execution

${PLATFORM_NAME_IOS}            iOS
${PLATFORM_VERSION_IOS}         8.1.2   # Uncomment this from the 'Open Application' keyword if you want to be spesific
${DEVICE_NAME_IOS}              iOS Emulator
${APP_IOS}                      ${CURDIR}${/}app${/}BitbarIOSSample.ipa
#${APP_IOS}                     ${PROJECTROOT}${/}application.ipa    # Uncomment for cloud execution
${AUTO_ACCEPT_ALERTS}           true


*** Keywords ***

Set Up And Open Android Application
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_ANDROID}    #platformVersion=${PLATFORM_VERSION_ANDROID}
    ...    deviceName=${DEVICE_NAME_ANDROID}    app=${APP_ANDROID}    automationName=${AUTOMATION_NAME}
    Wait Until Page Contains    What is the best way to test your application    5s

Set Up And Open Ios Application
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_IOS}    #platformVersion=${PLATFORM_VERSION_IOS}
    ...    deviceName=${DEVICE_NAME_IOS}    app=${APP_IOS}    automationName=${IOS_AUTOMATION_NAME}
    Wait Until Page Contains    What is the best way to test your application    5s

Set Up And Open Chrome
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_ANDROID}    #platformVersion=${PLATFORM_VERSION_ANDROID}
    ...    deviceName=${DEVICE_NAME_IOS}    browserName=Chrome    automationName=${AUTOMATION_NAME}

Set Up And Open Safari
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_IOS}    #platformVersion=${PLATFORM_VERSION_IOS}
    ...    deviceName=${DEVICE_NAME_IOS}    browserName=Safari    automationName=${IOS_AUTOMATION_NAME}
    Wait Until Page Contains    Automation for Apps   10s

Capture Screenshot On Failure
    Capture Page Screenshot    ${SCREENSHOTS}${/}${TEST NAME}.png<commit_msg>Fix deviceName for Chrome example<commit_after>*** Settings ***
Library           AppiumLibrary    run_on_failure=Capture Screenshot On Failure

*** Variables ***
${SCREENSHOTS}                  ${PROJECTROOT}${/}screenshots${/}

${REMOTE_URL}                   http://localhost:4723/wd/hub
${AUTOMATION_NAME}              appium
${IOS_AUTOMATION_NAME}          XCUITest

${PLATFORM_NAME_ANDROID}        Android
${PLATFORM_VERSION_ANDROID}     6.0.1   # Uncomment this from the 'Open Application' keyword if you want to be spesific
${DEVICE_NAME_ANDROID}          Android Emulator
${APP_ANDROID}                  ${CURDIR}${/}app${/}BitbarSampleApp.apk
#${APP_ANDROID}                  ${PROJECTROOT}${/}application.apk    # Uncomment for cloud execution

${PLATFORM_NAME_IOS}            iOS
${PLATFORM_VERSION_IOS}         8.1.2   # Uncomment this from the 'Open Application' keyword if you want to be spesific
${DEVICE_NAME_IOS}              iOS Emulator
${APP_IOS}                      ${CURDIR}${/}app${/}BitbarIOSSample.ipa
#${APP_IOS}                     ${PROJECTROOT}${/}application.ipa    # Uncomment for cloud execution
${AUTO_ACCEPT_ALERTS}           true


*** Keywords ***

Set Up And Open Android Application
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_ANDROID}    #platformVersion=${PLATFORM_VERSION_ANDROID}
    ...    deviceName=${DEVICE_NAME_ANDROID}    app=${APP_ANDROID}    automationName=${AUTOMATION_NAME}
    Wait Until Page Contains    What is the best way to test your application    5s

Set Up And Open Ios Application
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_IOS}    #platformVersion=${PLATFORM_VERSION_IOS}
    ...    deviceName=${DEVICE_NAME_IOS}    app=${APP_IOS}    automationName=${IOS_AUTOMATION_NAME}
    Wait Until Page Contains    What is the best way to test your application    5s

Set Up And Open Chrome
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_ANDROID}    #platformVersion=${PLATFORM_VERSION_ANDROID}
    ...    deviceName=${DEVICE_NAME_ANDROID}    browserName=Chrome    automationName=${AUTOMATION_NAME}

Set Up And Open Safari
    Open Application    ${REMOTE_URL}    platformName=${PLATFORM_NAME_IOS}    #platformVersion=${PLATFORM_VERSION_IOS}
    ...    deviceName=${DEVICE_NAME_IOS}    browserName=Safari    automationName=${IOS_AUTOMATION_NAME}
    Wait Until Page Contains    Automation for Apps   10s

Capture Screenshot On Failure
    Capture Page Screenshot    ${SCREENSHOTS}${/}${TEST NAME}.png
{'fraction_non_alphanumeric': 0.09968228752978554, 'fraction_numerical': 0.005559968228752979, 'mean_word_length': 3.2578191039729503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6186847', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1556, 'n_words': 353}