<commit_before>*** Settings ***

Documentation
...  This resource file imports the Salesforce and CumulusCI
...  keyword libraries, along with several other commonly used
...  libraries (Collections, OperatingSystem, String, XML). In
...  addition, it defines several other keywords.
...
...  This resource file also defines several global variables,
...  including ``${BROWSER}``, ``${ORG}``, and ``${DEFAULT_BROWSER_SIZE}``
...
...  This resource file should be included in every test suite,
...  like in the following example (note: there should be two
...  or more spaces after ``Resource``):
...
...  | ``*** Settings ***``
...  | ``Resource   cumulusci/robotframework/Salesforce.robot``

Library        Collections
Library        OperatingSystem
Library        String
Library        XML
Library        SeleniumLibrary  implicit_wait=${IMPLICIT_WAIT}  timeout=${TIMEOUT}
Library        cumulusci.robotframework.CumulusCI  ${ORG}
Library        cumulusci.robotframework.Salesforce  debug=${DEBUG}

*** Variables ***
${BROWSER}          chrome
${SELENIUM_SPEED}   0
${DEBUG}            ${false}
${CHROME_BINARY}    ${empty}
${ORG}              ${empty}
${IMPLICIT_WAIT}    7.0
${INITIAL_TIMEOUT}  180.0
${TIMEOUT}          30.0
${LOCATION STRATEGIES INITIALIZED}  ${False}
${DEFAULT BROWSER SIZE}  1280x1024

*** Keywords ***

Delete Records and Close Browser
    [Documentation]
    ...  This will close all open browser windows and then delete
    ...  all records that were created with the Salesforce API during
    ...  this testing session.
    Close All Browsers
    Delete Session Records

Locate Element By Text
    [Documentation]
    ...  This is registered as a custom locator strategy named ``text``.
    ...  It is shorthand for the locator ``//*[text()=...]``
    ...
    ...  Example:
    ...
    ...  | Wait until page contains element     text:Mobile Publisher

    [Arguments]  ${browser}  ${locator}  ${tag}  ${constraints}
    ${element}=  Get WebElement  //*[text()='${locator}']
    [Return]  ${element}

Locate Element By Title
    [Documentation]
    ...  This is registered as a custom locator strategy named ``title``.
    ...  It is shorthand for the locator ``//*[@title=...]``
    ...
    ...  Example:
    ...
    ...  | Wait until page contains element     title:Object Manager

    [Arguments]  ${browser}  ${locator}  ${tag}  ${constraints}
    ${element}=  Get WebElement  //*[@title='${locator}']
    [Return]  ${element}

Open Test Browser
    [Documentation]
    ...  Opens a test browser to the org.
    ...
    ...  The variable ${BROWSER} determines which browser should
    ...  open. The following four browsers are explicitly supported:
    ...  chrome, firefox, headlesschrome, and headlessfirefox. Any
    ...  other value will be passed directly to the SeleniumLibrary
    ...  'Open Browser' keyword.
    ...
    ...  Once the browser has been opened, it will be set to the given
    ...  size (default=${DEFAULT BROWSER SIZE})
    ...
    ...  The keyword `Log Browser Capabilities` will automatically be called.
    ...  The keyword will also call `Wait Until Salesforce is Ready` unless
    ...  the `wait` parameter is set to False.
    ...
    ...  The arguments 'username' or 'useralias' may be used to specify
    ...  a specific user; if not specified then the org default will be used.

    [Arguments]  ${size}=${DEFAULT BROWSER SIZE}  ${alias}=${NONE}  ${wait}=True  ${useralias}=${NONE}
    ${login_url}=  Login URL  alias=${useralias}

    Run Keyword If  '${BROWSER}' == 'chrome'  Open Test Browser Chrome  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'firefox'  Open Test Browser Firefox  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'headlesschrome'  Open Test Browser Chrome  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'headlessfirefox'  Open Test Browser Headless Firefox  ${login_url}  alias=${alias}
    ...    ELSE  Open Browser  ${login_url}  ${BROWSER}  alias=${alias}
    ${should_wait}=  convert to boolean  ${wait}
    Run keyword if  $should_wait  Wait Until Salesforce Is Ready  timeout=180
    Set Selenium Timeout  ${TIMEOUT}
    Initialize Location Strategies
    ${width}  ${height}=  split string  ${size}  separator=x  max_split=1
    Set window size  ${width}  ${height}
    Set selenium speed  ${SELENIUM_SPEED}
    Log browser capabilities<commit_msg>Fixed logic based on some last minute changes to the Login URL logic<commit_after>*** Settings ***

Documentation
...  This resource file imports the Salesforce and CumulusCI
...  keyword libraries, along with several other commonly used
...  libraries (Collections, OperatingSystem, String, XML). In
...  addition, it defines several other keywords.
...
...  This resource file also defines several global variables,
...  including ``${BROWSER}``, ``${ORG}``, and ``${DEFAULT_BROWSER_SIZE}``
...
...  This resource file should be included in every test suite,
...  like in the following example (note: there should be two
...  or more spaces after ``Resource``):
...
...  | ``*** Settings ***``
...  | ``Resource   cumulusci/robotframework/Salesforce.robot``

Library        Collections
Library        OperatingSystem
Library        String
Library        XML
Library        SeleniumLibrary  implicit_wait=${IMPLICIT_WAIT}  timeout=${TIMEOUT}
Library        cumulusci.robotframework.CumulusCI  ${ORG}
Library        cumulusci.robotframework.Salesforce  debug=${DEBUG}

*** Variables ***
${BROWSER}          chrome
${SELENIUM_SPEED}   0
${DEBUG}            ${false}
${CHROME_BINARY}    ${empty}
${ORG}              ${empty}
${IMPLICIT_WAIT}    7.0
${INITIAL_TIMEOUT}  180.0
${TIMEOUT}          30.0
${LOCATION STRATEGIES INITIALIZED}  ${False}
${DEFAULT BROWSER SIZE}  1280x1024

*** Keywords ***

Delete Records and Close Browser
    [Documentation]
    ...  This will close all open browser windows and then delete
    ...  all records that were created with the Salesforce API during
    ...  this testing session.
    Close All Browsers
    Delete Session Records

Locate Element By Text
    [Documentation]
    ...  This is registered as a custom locator strategy named ``text``.
    ...  It is shorthand for the locator ``//*[text()=...]``
    ...
    ...  Example:
    ...
    ...  | Wait until page contains element     text:Mobile Publisher

    [Arguments]  ${browser}  ${locator}  ${tag}  ${constraints}
    ${element}=  Get WebElement  //*[text()='${locator}']
    [Return]  ${element}

Locate Element By Title
    [Documentation]
    ...  This is registered as a custom locator strategy named ``title``.
    ...  It is shorthand for the locator ``//*[@title=...]``
    ...
    ...  Example:
    ...
    ...  | Wait until page contains element     title:Object Manager

    [Arguments]  ${browser}  ${locator}  ${tag}  ${constraints}
    ${element}=  Get WebElement  //*[@title='${locator}']
    [Return]  ${element}

Open Test Browser
    [Documentation]
    ...  Opens a test browser to the org.
    ...
    ...  The variable ${BROWSER} determines which browser should
    ...  open. The following four browsers are explicitly supported:
    ...  chrome, firefox, headlesschrome, and headlessfirefox. Any
    ...  other value will be passed directly to the SeleniumLibrary
    ...  'Open Browser' keyword.
    ...
    ...  Once the browser has been opened, it will be set to the given
    ...  size (default=${DEFAULT BROWSER SIZE})
    ...
    ...  The keyword `Log Browser Capabilities` will automatically be called.
    ...  The keyword will also call `Wait Until Salesforce is Ready` unless
    ...  the `wait` parameter is set to False.
    ...
    ...  The arguments 'username' or 'useralias' may be used to specify
    ...  a specific user; if not specified then the org default will be used.

    [Arguments]  ${size}=${DEFAULT BROWSER SIZE}  ${alias}=${NONE}  ${wait}=True  ${useralias}=${NONE}
    ${login_url}=  Run keyword if  $useralias  Login URL  alias=${useralias}
    ...  ELSE  Login URL

    Run Keyword If  '${BROWSER}' == 'chrome'  Open Test Browser Chrome  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'firefox'  Open Test Browser Firefox  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'headlesschrome'  Open Test Browser Chrome  ${login_url}  alias=${alias}
    ...    ELSE IF  '${BROWSER}' == 'headlessfirefox'  Open Test Browser Headless Firefox  ${login_url}  alias=${alias}
    ...    ELSE  Open Browser  ${login_url}  ${BROWSER}  alias=${alias}
    ${should_wait}=  convert to boolean  ${wait}
    Run keyword if  $should_wait  Wait Until Salesforce Is Ready  timeout=180
    Set Selenium Timeout  ${TIMEOUT}
    Initialize Location Strategies
    ${width}  ${height}=  split string  ${size}  separator=x  max_split=1
    Set window size  ${width}  ${height}
    Set selenium speed  ${SELENIUM_SPEED}
    Log browser capabilities
{'fraction_non_alphanumeric': 0.13445566778900112, 'fraction_numerical': 0.0049382716049382715, 'mean_word_length': 2.7919148936170215, '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': '2221957', 'n_tokens_mistral': 2696, 'n_tokens_neox': 2604, 'n_words': 906}