A framework or software framework provides a platform to develop applications on a particular subject. Through this framework, a software developer can build a program on a specific platform.
A Framework may include predefined classes and functions, these classes and functions may be used to process input and manage hardware devices and to interact with the system software.
Robot framework is one of the worthiest and widely used test automation frameworks available in the market. The robot framework contains a set of tools, techniques, and abstracts rules.
The robot framework simplifies the test automation tools and has the capability to interact with third-party libraries and functions.
Generic test automation framework for acceptance testing
The robot framework is implemented with Python, Jython, and Iron Python, PyPy, and before installing the framework, we have to install at least one interpreter. We will be using Python.
Different ways of installing framework are listed below:
python in your command prompt, we can verify whether the python is installed in your system or not.
If the python is not installed in your system, then the windows will not recognize the
python command and throws an error as python is not recognized as an internal and external program or batch file.
You can install the python in your system, refer the installation procedure: install the python
Open This PC/MY Computer and right-click on it and then select the Properties under that.
Next, Under the Control Panel select the Advanced system settings and under the system properties, Select the Environmental Variables
Select the system variables under the environmental variables and then click on the path and select edit (
Next, click on New under the edit environmental variable and add the python37 path to it as shown:
C:Python3.7 and then click on the ok button.
Now, reopen command prompt and enter
python, You should see the version of the python in the command prompt.
We can use the Python Package installer to install the packages from the python package index and other indexes.
Using the pip is the recommended way to install the robot framework, as the standard python package installer, it is included in the latest python, Jython and Iron Python versions.
If pip is already installed and if you are using python 2>=2.7.9 or python 3>=3.4, and directly executed by using the following code
pip install robotframework
Open the Command prompt and type as
pip, if it is not configured in the system, then Windows will throw an error as pip is not recognized as an internal or external program.
The PIP has been configured in a different path, and hence, the system is not able to recognize the pip command.
To configure pip, go to MyComputer and select the system variables under the environmental variables and then click on the path and select edit (
C:Python27Scripts a new variable path in the environmental variable.
Go to command prompt and type
pip, the windows will now show useful commands.
pip --version, the windows give complete details on the pip version
You can upgrade the pip version by using the command
pip install --upgrade pip
So the system will uninstall the old version of the
pip and install the latest version of the pip.
The robot framework is an open-source framework, and hence the developers of the robot framework have pushed the source code into the Github.
You can download the robot framework by using the official link of the GitHub https://github.com/robotframework/robotframework
You can find the setup.py file in the Github page and download the robot framework.
But we already have installed the pip, and hence we can install directly by using the command
pip install robotframework
Open the command prompt and type the command as
pip install robotframework
Ride Editor dependencies contain the installation of Wxpython and Pywin32.
Wxpython is a python package that can be imported at runtime, includes a collection of python modules and an extension module.
Wxpython provides a series of classes that mirror many of the wxWindows GUI classes. This extension module attempts to mirror the class hierarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes, and acts almost the same as the wxFrame class in the C++ version.
wxPython is very versatile. It can be used to create standalone GUI applications, or in situations where Python is embedded in a C++ application as an internal scripting or macro language.
Currently, wxPython is available for Win32 platforms and the GTK toolkit(wxGTK) on most Unix/X-windows platforms. The effort to enable wxPython for wxMotif will begin Shortly.
Let us see how to install Wxpython:
Log on to the given link https://github.com/robotframework/RIDE/wiki/Installation-Instructions
You will see the installation instructions for the robot framework, which contain some preconditions, as shown below:
We have already installed python and Robot Framework, now install wxPython, click on the wxPython download page as shown below
Once you click on the wxpython download page, it will take you to the wxPython version page and then select the wxPython version as shown below:
Once you click on the
wxpython2.8-win64-unicode-22.214.171.124-py27.exe version, windows will start downloading the wxPython
Once it completes the download, right-click on the folder and install software
Click on the Next to install the wxPython on your computer
Select I accept the agreement and click on Next.
And then, select the destination and click on Next.
Once it completes the installation, click on Finish.
So, we have installed wxPython successfully on the system.
The pywin32 package has been around for a very long time. The book that covers this topic was published in 2000 by Mark Hammond and Andy Robinson. Despite being 18 years old, the underlying technology and concepts still work today.
Pywin32 is a very thin wrapper of python that allows us to interact with COM (Component Object Module) objects and automate windows applications with python. The power of this approach is that you can pretty much do anything that a Microsoft Application can do through python.
The downside is that you have to run this on a windows system Microsoft Office installed. Before we go through some examples, make sure you have pywin32 installed on your system using
First, go to the given link: https://pypi.org/project/pywin32/, you will see the below page
Now, you can see the command to install the pywin32 on your computer, click on the copy symbol and then open the command prompt and paste it, so the system will start installing the pywin32.
The pywin32 has been installed successfully on your system.
The robot framework IDE is an integrated development environment to implement automated tests for Robot Automation.
Go to https://pypi.org/project/robotframework-ride/
And copy the command (
pip install robotframework-ride) given in this page and open the command prompt and paste it and press enter. The RIDE will be installed successfully on the system.
It has satisfied all the requirements and successfully installed the robot framework. To check whether the robot framework has successfully installed or not, we have to run the command
If it is successfully installed, the ride editor page will open.
I am getting an error while opening the ride editor as shown below
C:UsersUser>ride.py Traceback (most recent call last): File "C:UsersUserAppDataLocalProgramsPythonPython37Scripts ide.py", line 21, in <module> from robotide import main ImportError: No module named robotide
To overcome this error, I used the command
python.exe -c "from robotide import main; main()" and press enter. The editor page will open, as shown below.
Python 3.7 does not support the Ride editor when you install the ride editor in python 3.7 and tr to open the ride editor by using the command
ride.py, the ride editor page will not open. then I used to open the ride editor by using the below command.
python.exe -c "from robotide import main; main()"
As well as python 3.7 won't support Selenium and Excel Library and hence I uninstall python 3.7 and installed 2.7