Your ultimate guide

Robot Framework Setup in Pycharm IDE



Robot Framework In Python:

About Robot Framework
# Robot Framework is an open-source automation framework for Acceptance Testing.
# Robot Framework is easy to learn and not much programming knowledge is required.
# It uses a keyword-driven testing technology approach.
# Users can create new higher-level keywords from existing ones using the same syntax used for creating test cases.
# To write the script in selenium automation we need to know lots of methods for every action, but in the robot framework by using some keywords we can automate the web page.
# Robot framework supports a lot of Libraries - BuiltIn Library, Selenium Library, DB Library, DateTime Library etc.,
- Every Library has different keywords by importing that library we can access those keywords.
- By default, these libraries are not included in the robot framework, we need to download the library and use it.
- To automate the webpage we use Selenium Library.
 
Robot Framework setup:
1.  Install Python
2.  Install Pycharm IDE
3.  Install selenium (optional)
4.  Install robot framework
5.  Install Robot framework selenium library

Step 1: Install Python
- Goto Python's official website, then download and install the latest version of Python. 
- I am already posted how to install Python software, click here for the installation process.

Step 2: Install Pycharm IDE
- Click on this link: https://www.jetbrains.com/pycharm/
- Then download Pycharm Community Edition and install it.
- I am already posted how to install Pycharm IDE, click here for the installation process.
Step 3: Install selenium
- Go to the command prompt (win + R, then type cmd and press ENTER).
- Give the command pip install selenium and press ENTER. Then selenium will be installed.
Step 4: Install the robot framework
- Go to the command prompt (win + R, then type cmd and press ENTER).
- Give the command pip install robotframework and press ENTER.
        

Step 5: Install the robot framework Selenium library
- Go to the command prompt (win + R, then type cmd and press ENTER).
- Give the command pip install robotframework-seleniumlibrary and press Enter.
        

------------------ *** ------------------

Setup In PyCharm IDE:

    selenium, robotframework and robotframework-seleniumlibrary these 3 packages, whenever we create a new PROJECT in the PyCharm IDE we need to install these packages in that project also.

To add these packages to the project using GUI:
    1.  First, open Pycharm IDE and open your Project or create a new Project (Click on the Menu (☰),  Select File in that click on New Project and give the project name then click on Create)
    2.  To install packages, Click on Menu (☰), Select File in click on Settings.
    3.  Then select your Project (Project: your project name), then click on Project Interpreter.
    4.  Click on the "+" symbol to add a package, then search package name and install it.
a.  Search selenium, then click on install package.
b.  After installing selenium, search robotframework and then click on install package.
c.  After installing robotframework, search robotframework-seleniumlibrary and then click on install package.

To add these packages to the project using CLI (Terminal):
    1.  First, open Pycharm IDE and open your Project or create a new Project (Click on the Menu (☰),  Select File in that click on New Project and give the project name then click on Create)
    2.  Go to the Terminal in Pycharm, for that Click on the Menu(☰), select View, then select Tool windows and then click on Terminal. (Shortcut key: Alt + F12)
    3.  By default, the terminal locates the current project path.
a.  Type command pip install selenium then press ENTER, then selenium will be installed.
b.  Type the command pip install robotframework then press ENTER, and then the robot framework will be installed.
c.  Type the command pip install robotframework-seleniumlibrary and then press ENTER.

------------------ *** ------------------

Installing Plugin to PyCharm IDE:
# By default, PyChram IDE can't identify the robot framework files.
# To identify the robot file we need to add a plugin to PyCharm IDE this is a one-time activity.
# There are a lot of plugins that are there to identify the robot file (intelliBot, intelliBot @seleniumlibrary patched, Hyper RobotFramework Support etc.,) we need to add one of the plugins.
- To add Plugin to Pycharm:
- Open PyCharm IDE
- Click on Menu (☰), then select File and then click on Settings.
- In the setting tab click on Plugins
- Search for Hyper RobotFramework Support and install it.

        



No comments:

Post a Comment