How to setup Robot Framework
Robot framework is a popular automation framework to use for acceptance test. Using the same syntax, it can run on any OS — In this tutorial, I will be using Mac.
The groundwork
First is to make sure you have pip, virtualenv and virtualenvwrapper install on your machine.
use this to select the environment to work on
workon
Because Python may get a little silly when we install many conflicting packages, it is a good practice to create virtual environment before we start working on that.
Once you are in the Virtual Environment — go ahead and install robot and selenium.
pip install robotframework
pip install robotframework-selenium2library
Congrads, now you have Robot running on your machine !!!
If you have not already, it is a good idea to visit Robot Github page
Setting Web Driver
Firefox should work out of the box.
Safari is relatively easy to setup.
For Chrome, it is a little harder. First go to
https://sites.google.com/a/chromium.org/chromedriver/downloads
to get the chromedriver and place it in this path
/usr/local/bin/chromedriver
Simple Hello Google
Write a simple robot file. The Goal is to just open google.
***setting***
Library Selenium2Library***Test case***
Open Google
Open Google*** Variables ***
#01Welcome Page
${URLwelcome} https://www.google.com
${BROWSER} chrome***Keyword***
Open Google
Open Browser ${URLwelcome} ${BROWSER}
You should now see a google page
This should be enough to get you up and running.
If you want to learn more about robot framework and selenium http://robotframework.org/ is a good place to start
Have fun
— Pondd —