In this guide, you will learn how to write your first Robot Framework browser test from scratch. We will also cover how to set up your development environment using PyCharm, install required plugins, and configure everything needed to start browser automation using Robot Framework.
By the end of this article, you will have a working browser automation test that opens a website and performs basic interactions.
Prerequisites
Before writing your first test, ensure you have the following installed:
- Python (3.8 or higher recommended)
- pip (Python package manager)
- A stable internet connection
Step 1: Install Robot Framework and Browser Library
Please refer to previous article: Installing Robot Framework Browser Library
Step 2: Download and Install PyCharm IDE
We will use PyCharm as our development environment.
Download PyCharm
- Go to the official PyCharm website: Download PyCharm
- Important Note: Now from 2026, we do not have separate free Community Edition to download. You have to download Professional Edition. It will show first month trial but you do not have to buy subscription and can use core features for free after the first free month is over.
- Download the installer for your operating system
Install PyCharm
- Windows: Run the
.exeinstaller and follow the setup wizard - macOS: Drag PyCharm into Applications folder
- Linux: Extract the tar file and run
pycharm.sh
Once installed, launch PyCharm.
Step 3: Configure Python Interpreter in PyCharm
- Open PyCharm
- Click New Project
- Select Existing interpreter or create a new virtual environment
- Ensure Python is correctly detected
- Click Create
This ensures Robot Framework dependencies are available inside your project.
Step 4: Install Robot Framework Plugin in PyCharm
To improve development experience, install a Robot Framework plugin.
Recommended Plugin:
- Robot Framework Language Server
Installation Steps:
- Open PyCharm
- Go to File → Settings → Plugins
- Search for:
Robot Framework Language Server - Click Install
- Restart PyCharm
Why this plugin is useful:
- Syntax highlighting for
.robotfiles - Code completion for keywords
- Error detection
- Better test case structure support
Step 5: Create Your First Robot Framework Project
Inside PyCharm:
- Create a new project folder (e.g.,
robot-tests) - Inside the project, create a file:
first_test.robot
Step 6: Write Your First Browser Test
Now let’s write a simple browser automation test.
*** Settings ***Library Browser*** Test Cases ***Open Google And Search New Browser chromium headless=False New Page https://www.google.com Close Browser
Step 7: Run Your Test
In PyCharm terminal:
robot first_test.robot
After execution, Robot Framework will generate:
log.htmlreport.htmloutput.xml
Open report.html in a browser to see detailed results.
How This Test Works
Let’s break it down:
- New Browser → launches Chromium browser
- New Page → opens Google
- Close Browser → ends session
This demonstrates a simple browser automation flow.
Common Issues and Fixes
1. Browser not launching
Run:
rfbrowser init
2. Module not found error
Ensure:
pip install robotframework-browser
3. PyCharm not recognizing keywords
Check that Robot Framework plugin is installed and project interpreter is correct.
Best Practices
- Always use virtual environments per project
- Keep tests modular and reusable
- Use meaningful test case names
- Avoid hard-coded waits; prefer smart waits
- Structure tests using reusable keywords (in future steps)
Conclusion
You have successfully set up PyCharm, installed Robot Framework dependencies, configured plugins, and executed your first browser automation test.
This is the foundation of building scalable and maintainable automation frameworks using Robot Framework.
In the next guide, we will refactor this test into a structured framework using best practices.
Related Articles
✓ Complete Robot Framework Tutorial
✓ Robot Framework Architecture Explained
✓ Installing Robot Framework Browser Library
✓ Browser Library vs SeleniumLibrary
Discover more from Rotebit
Subscribe to get the latest posts sent to your email.

