Created
July 4, 2017 14:34
-
-
Save ujwalp1994/fbb77e850a4f38016922d31f5e39145c to your computer and use it in GitHub Desktop.
Sample Test to run Robot tests on BrowserStack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Library Selenium2Library | |
Library Collections | |
Library Collections | |
Library String | |
Library BuiltIn | |
*** Variables *** | |
${SITE_URL} = https://sprint-005-origin.levi-site.com/CA/en_CA/ | |
${SELENIUM_TIME_OUT} = 120 | |
${SELENIUM_SPEED} = 0.45 | |
${BROWSER} = IE | |
${REMOTE_URL} = http://USERNAME:ACCESS_KEY@hub.browserstack.com:80/wd/hub | |
${DC} | |
*** Test Cases *** | |
TC001_BrowserStack_Test | |
Close All Browsers | |
Set Selenium Timeout ${SELENIUM_TIME_OUT} | |
Set Selenium Speed ${SELENIUM_SPEED} | |
Open Browser ${SITE_URL} ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DC} | |
Maximize Browser Window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to Configure:
Step-1: Download and install Python. Check the installed version using
pip --version
Step-2: Install Robot framework using
pip install robotframework
Step-3: Install Selenium2Library using
pip install robotframework-selenium2library
Step-4: Install Selenium if not already installed using
pip install -U selenium
Step-5: Download the sample file and execute using the following command:
pybot -v DC:"os:Windows,browser:Firefox,browserstack.local:true" BrowserStack.robot
Note: The parameters under the dictionary DC are desired capabilities for executing tests on BrowserStack.