-
-
Save ashwingonsalves/5258ccdd331d8d9d103dd9c6561fcbf1 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://www.browserstack.com | |
${SELENIUM_TIME_OUT} = 120 | |
${SELENIUM_SPEED} = 0.45 | |
${BROWSER} = Chrome | |
${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 | |
Close Browser |
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:
robot -v DC:"os:Windows,os_version:10,browser:Chrome,browser_version:62.0" BrowserStack.robot
Note: The parameters under the dictionary DC are desired capabilities for executing tests on BrowserStack.