Setup for Robot Framework Automation – User friendly Tech help

World changes constantly..
nWe change each day..
nOnce U find itself U have to begin again.
n
nToday we are changing and learning Robot Framework and thought of sharing the same with others co-learners, please add your expertise as comments to this post. We have already shared our posts on established automation tools like UFT and Selenium.
n
nDo follow us on  Fb,G+,Twitter, it encourages us to learn and share more.
n
nLets start with the installation of Robot Framework(RF), followed with our first test case with RF.
n
nPrerequisites :-
n1.Python:- This is the language on which the architecture of RF is based on.Most updated version of RF(2.9), supports Python-2.7, still contributing team is working on the support for Python -3.
n
nDownload Link:- Python  – Click on Downloads Menu – Download the latest version of python 2.7.* 
n
nNote:-

n

    n

  • On most UNIX-like systems such as Linux and OS X you have Python installed by default
  • n

  • Latest Python Windows installers allow setting PATH as part of the installation. This is disabled by default, but Add python.exe to Path can be enabled on the Customize Python screen.
  • n

  • n

  • Now if we check (Control PanelSystem and SecuritySystemAdvance system settingsEnvironment VariablesSystem variables path) we can see the value added in the starting itself C:Python27;C:Python27Scripts;
  • n

  • Where our Installation path  = C:Python27 and Python scripts(where our Robot framework would be installed)= C:Python27Scripts
  • n

  • n

  • We haven’t discussed about installation of Jython and IronPython, these are interpreters we need incase we are coding in Java and .net technologies.
  • n

n

nHow to check python is installed on system?
nEasiest approach is open the command prompt and execute the command “python –version”
n

nn


2.Package Manger:-We can use any package manager like pip, easy_intstall for installing robot-framework.We would be using pip as it is coming bundled with latest version of python (starting 2.7.9) , else we need to install pip first and then utilize it.

n

So don’t worry about this now.

n

Installing Robot Framework(RF):-

n

Using pip command:-

n

# Install the latest version

n

pip install robotframework

n

n

n

n

n

n

n

n

n

It would take fractions of seconds to install the setup.The above command would install only the latest stable release in case we want a particular version like old or beta release we can use it like:-

n

# Install 2.9 beta 1

n

pip install robotframework==2.9b1

n

n#For upgrade we can use the command
npip install –upgrade robotframework
n

n

Using Windows installer:-

n

Installers are available on PyPI, select the one as per the OS(32 or 64 bit)
n1.Extract the .tar file using (say 7-zip)
n2.Open the command window inthe installer package and type “setup.py install
n

n

n

n

n

n

n

n

n

n

Note:-We can install RF by using “Source from GitHub”, “Using JAR in Maven Central” or “Manual” approach but we are not discussing this as above techniques are frequently used.

n

How to verify the installation of Robot Framework?

n

To verify, we need to use the Runner script, based on the interpreter used. Meaning a technique to trigger RF based on each type of interpreter. 

n

In our example we have used Python interpreter.

n

Simply type the command pybot –version in the command prompt and we are done.
n

n

n

Note:- Each type of interpreter have their own Runner scripts:-

n

n

n

n

n

n

n

n

n

Where we can locate the Robot Framework code?

n

All the robot framework code after installation can be found inside C:Python27Libsite-packagesrobot

n

How to install “Selenium2Library”?

n

We need this library to work with web applications.

n

Execute the command pip install robotframework-selenium2library and we are done with the installation.
n

n

n
n
nHow to verify the installation of Selenium2Library:-
nOpen cmd prompt type python
ntype import Selenium2Library
nif we are able to see >> symbol means we are succsessfull.
n
n

n

n
nHow to check the Selenium Keywords that we can use:-
nWe can utilize the online resource for Selenium Library.
nFurther we can play with python code of these keywords.
nPath of Selenium Keywords on local system relative to Python installation = Python27Libsite-packagesSelenium2Librarykeywords 
nOpen any of the .py file and check the code.
n
nRIDE:-

nWe can use this IDE for writing our robot framework.As a beginner it is easy to grasp this IDE, further we can implement other IDE’s like pyCharm also.
n
nPreconditons:- We need python, robotframework and wxPython already installed to launch RIDE. Thus we still need to install wxPython as we already done with first 2 components.
n
nwxPython:- RIDE’s GUI is implemented using wxPython toolkit.
n
nInstall wxPython:- 
nSelect the required .exe as per the system requirement.
n
nDownload link:- wxPython
n
n
n
nFor Unix OS: – sudo apt install python-wxgtk2.8
n
 Installing RIDE:-
n
nWe would install it using the following pip command.
npip install robotframework-ride
n

n
nNote:-
n
n

    n

  • Using the pip command we are installing the latest stable release.Incase we want to check the beta/alpha release we can follow the RIDE github page.
  • n

  • To create the desktop shortcut on windows we need to use the .exe of the installer, that we can get again at the release link.
  • n

n

n
nLaunching RIDE :- type the command ride.py in command prompt and we are done
n

n

n

Writing our first test case in RF?

Was this article helpful?
YesNo

Similar Posts