Pre-requisite before installing Robot Framework
- Install Python in your machine first and set the PATH: Python Installer. Recommended to use stable version
- Refer to the installation guide here: Python Installation Guide
Installing Robot Framework
- To install, type in terminal(in your IDE) or Python and type "pip install robotframework"
- Once installation is complete, you can use the following methods to verify:
- Type robot --version" in your terminal, else
- Type "pip show robotframework"
- You should see the following:
Name: robotframework Version: 3.0.2 Summary: A generic test automation framework Home-page: http://robotframework.org Author: Robot Framework Developers Author-email: [email protected] License: Apache License 2.0 Location: /Library/Python/2.7/site-packages Requires:
- Installation Guide
Installing SeleniumLibrary
- You will need SeleniumLibrary to run all Selenium functions for Robot Framework.
- To install type the following command: 'pip install --upgrade robotframework-seleniumlibrary'
- GitHub Repo: SeleniumLibrary
How to Run Robot Framework
Running the entire scenarios in your robot file
- To run a line of code, type 'python -m robot -d output '
- Example: 'python -m robot -d output test\site_opening.robot'
- Alternative method to run Robot: 'robot -d Results Tests/Login_test_scenarios.robot'
Running a specific tag in your robot file
- To run a line of code, type 'python -m robot -i '
- Example: 'python -m robot -d smoke test\site_opening.robot'
Plugins:
- IntelliJ
- For IntelliJ users, you will need to install the following:
- Python Community Edition by JetBrains
- Robot Framework Language Server by Robocorp
Libraries
- FakerLibrary: https://github.com/guykisel/robotframework-faker
- CryptoLibrary: https://snooz82.github.io/robotframework-crypto/CryptoLibrary.html
Robot Framework Links: