*Setting*
Library  SeleniumLibrary  \  \  4455  \  NONE
Library  Collections
Library  OperatingSystem


*Variable*
${SERVER}  localhost:7272
${BROWSER}  *firefox
${ROOT}  http://${SERVER}/html/


*Keyword*
Open Browser To Start Page
  [Documentation]  This keyword also tests 'Set Selenium Speed' and 'Set Selenium Timeout' against all reason.
  Open Browser  ${ROOT}  ${BROWSER}
  ${old timeout} =  Set Selenium Speed  ${SPEED}
  Should Be Equal  ${old timeout}  0 seconds
  ${old timeout} =  Set Selenium Timeout  2 seconds
  Should Be Equal  ${old timeout}  5 seconds

Cannot Be Executed In IE
  ${runsInIE}=  Set Variable If  "${BROWSER}".replace(' ', '').lower() in ['ie', '*iexplore', 'internetexplorer']  ${TRUE}
  Run Keyword If   ${runsInIE}  Set Tags  ie-incompatible
  Run Keyword If   ${runsInIE}  Fail And Set Non-Critical  This test does not work in Internet Explorer

Fail And Set Non-Critical
  [Arguments]  ${msg}
  Remove Tags  regression
  Fail  ${msg}

Go to Front Page
    Go To  ${ROOT}

Set ${level} Loglevel
    Set Log Level  ${level}

*Setting*
Library  SeleniumLibrary  \  \  4455  \  NONE
Library  Collections
Library  OperatingSystem


*Variable*
${SERVER}  localhost:7272
${BROWSER}  *firefox
${ROOT}  http://${SERVER}/html/


*Keyword*
Open Browser To Start Page
  [Documentation]  This keyword also tests 'Set Selenium Speed' and 'Set Selenium Timeout' against all reason.
  Open Browser  ${ROOT}  ${BROWSER}
  ${old timeout} =  Set Selenium Speed  ${SPEED}
  Should Be Equal  ${old timeout}  0 seconds
  ${old timeout} =  Set Selenium Timeout  10 seconds
  Should Be Equal  ${old timeout}  5 seconds

Cannot Be Executed In IE
  ${runsInIE}=  Set Variable If  "${BROWSER}".replace(' ', '').lower() in ['ie', '*iexplore', 'internetexplorer']  ${TRUE}
  Run Keyword If   ${runsInIE}  Set Tags  ie-incompatible
  Run Keyword If   ${runsInIE}  Fail And Set Non-Critical  This test does not work in Internet Explorer

Fail And Set Non-Critical
  [Arguments]  ${msg}
  Remove Tags  regression
  Fail  ${msg}

Go to Front Page
    Go To  ${ROOT}

Set ${level} Loglevel
    Set Log Level  ${level}

Increase the timeout to accommodate slower test systems
Increase the timeout to accommodate slower test systems
