Robot Framework has become one of the most popular open-source automation frameworks for UI testing, API testing, desktop automation, and even RPA (Robotic Process Automation). Its keyword-driven approach makes automation readable for both technical and non-technical team members. This guide covers the most commonly asked Robot Framework Interview Questions and Answers.
What is Robot Framework?
Robot Framework is an open-source automation framework that follows a keyword-driven testing approach.
It supports:
- Web automation
- API testing
- Mobile testing
- Database testing
- Desktop automation
- SSH
- RPA
Robot Framework is written in Python but test cases can be written without deep programming knowledge.
Why Companies Use Robot Framework
Some advantages include:
- Easy-to-read syntax
- Cross-platform support
- Large collection of libraries
- Excellent reporting
- Open source
- Easy integration with CI/CD
- Supports parallel execution
1. What is Robot Framework?
Answer
Robot Framework is an open-source generic automation framework that uses keyword-driven testing.
It separates test logic from implementation, making tests easier to understand.
Example:
*** Test Cases ***Login Test Open Browser https://example.com chrome Input Text id=username admin Input Password id=password password Click Button Login Page Should Contain Dashboard
2. What are the main sections in a Robot Framework file?
Answer
A Robot Framework test file usually contains:
*** Settings ****** Variables ****** Test Cases ****** Keywords ***
Example:
*** Variables ***${URL} https://example.com*** Test Cases ***Open Website Open Browser ${URL} chrome
3. What is a Keyword?
Answer
Keywords are reusable actions.
Example:
Login To Application Input Text id=username admin Input Password id=password pass123 Click Button Login
Now use it:
*** Test Cases ***Valid Login Login To Application
4. What types of keywords are available?
Answer
Robot Framework supports:
- Built-in Keywords
- Library Keywords
- User Keywords
- Resource File Keywords
- Python Library Keywords
5. Difference between Test Cases and Keywords?
Test Case
Represents a complete test.
Keyword
Represents reusable logic.
Example:
*** Test Cases ***Verify Login Login*** Keywords ***Login Input Text username admin
6. What is SeleniumLibrary?
Answer
SeleniumLibrary provides browser automation keywords.
Examples:
Open BrowserClick ElementInput TextWait Until Element Is VisibleClose Browser
7. How do you install SeleniumLibrary?
pip install robotframework-seleniumlibrary
8. How do you execute Robot Framework tests?
Single file:
robot LoginTests.robot
Directory:
robot Tests/
9. What reports are generated?
Robot Framework generates:
- report.html
- log.html
- output.xml
These provide execution summaries, logs, screenshots (if configured), and keyword execution details.
10. What is a Resource File?
A Resource File stores reusable keywords and variables.
Example:
*** Keywords ***Login Input Text username admin
Import:
*** Settings ***Resource CommonKeywords.robot
11. What are Variables?
Robot Framework supports:
Scalar
${USERNAME}
List
@{USERS}
Dictionary
&{EMPLOYEE}
Example:
*** Variables ***${URL} https://example.com@{BROWSERS} chrome firefox
12. Difference between Variables and Environment Variables?
Variables:
${URL}
Environment variables:
%{PATH}
Environment variables come from the operating system.
13. Explain Setup and Teardown.
Example:
*** Settings ***Test Setup Open BrowserTest Teardown Close Browser
Used to execute common pre/post conditions.
14. What are Tags?
Tags help categorize tests.
Example:
[Tags] Smoke
Run only Smoke tests:
robot --include Smoke
15. How do you skip tests?
Skip Feature not implemented
16. How do you perform Data-Driven Testing?
Using templates:
*** Test Cases ***Login [Template] Verify Loginadmin pass1guest pass2
17. What is DataDriver?
DataDriver reads test data from:
- Excel
- CSV
- JSON
Example:
Library DataDriver users.csv
Very useful for interview discussions.
18. How do loops work?
Example:
FOR ${item} IN @{ITEMS} Log ${item}END
19. Conditional Statements?
Example:
IF '${status}'=='PASS' Log SuccessELSE Log FailedEND
20. How do you call Python code?
Example Python:
class Calculator: def add(self,a,b): return a+b
Robot:
Library Calculator.py${sum}= Add 2 3
21. Can Robot Framework perform API testing?
Yes.
Using RequestsLibrary:
Create SessionGET On SessionPOST On SessionDELETE On Session
Example:
Create Session api https://reqres.in${response}= GET On Session api /users/2Should Be Equal As Integers ${response.status_code} 200
22. How do you validate JSON responses?
Example:
Should Be EqualShould ContainDictionary Should Contain Key
23. Can Robot Framework connect to databases?
Yes.
Using DatabaseLibrary.
Example:
Connect To DatabaseExecute SQL StringQuery
24. Can Robot Framework run tests in parallel?
Yes.
Using:
Pabot
Example:
pabot Tests/
25. How do you capture screenshots?
Capture Page Screenshot
Usually executed in teardown after failures.
26. How do you organize a large Robot Framework project?
Example structure:
ProjectTestsResourcesLibrariesDataReportsConfigs
Separate reusable keywords into resource files and keep test data externalized.
27. What is Listener Interface?
Listeners allow custom actions during execution.
Example:
- Logging
- Screenshots
- Reporting
- Notifications
28. Difference between Resource and Library?
| Resource | Library |
|---|---|
| Robot keywords | Python code |
| .robot | .py |
| Easy reuse | Advanced logic |
29. What are Robot Framework best practices?
- Keep keywords short
- Reuse common keywords
- Avoid hardcoded values
- Use variables
- Use resource files
- Separate test data
- Follow naming conventions
- Generate clean reports
- Use tags effectively
- Run tests in parallel where appropriate
30. What are common interview questions on framework design?
Interviewers may ask:
- How do you design a scalable Robot Framework project?
- How do you integrate Robot Framework with Jenkins or GitHub Actions?
- How do you manage test data?
- How do you implement Page Object Model?
- How do you handle dynamic locators?
- How do you run tests across multiple browsers?
- How do you generate Allure reports?
- How do you integrate API and UI automation in the same framework?
Bonus Interview Question
Explain the Robot Framework execution flow.
A typical execution flow is:
robot command↓Read Settings↓Load Libraries↓Load Variables↓Execute Test Cases↓Execute Keywords↓Generate output.xml↓Generate log.html↓Generate report.html
Understanding this flow helps troubleshoot issues related to imports, variable resolution, and keyword execution.
Frequently Asked Questions
Is Robot Framework only for Selenium?
No. Robot Framework supports Selenium, Playwright (via Browser library), API testing, database testing, mobile automation, desktop automation, SSH, and more.
Is Python mandatory?
No. Basic automation can be created without Python. However, Python is useful for creating custom libraries and advanced keywords.
Can Robot Framework replace Selenium?
Not exactly. Robot Framework is a framework, while Selenium is a browser automation tool. Robot Framework often uses SeleniumLibrary internally to automate web browsers.
Is Robot Framework suitable for enterprise automation?
Yes. With proper project structure, CI/CD integration, reusable resource files, and parallel execution, Robot Framework is widely used in enterprise-grade automation projects.
Final Thoughts
Robot Framework remains a strong choice for modern test automation due to its readable syntax, extensive library ecosystem, and flexibility across UI, API, database, and desktop testing. Mastering the concepts covered in these interview questions—from keywords and variables to framework design and parallel execution—will help you confidently answer technical interview questions and build maintainable automation frameworks.
If you’re targeting a Senior QA Automation Engineer role, complement your Robot Framework knowledge with Python fundamentals, API testing, CI/CD, Git, Docker, and cloud-based test execution to stand out from other candidates.
Related Links
- What is Robot Framework?
- Framework Architecture
- Installation
- Installing Browser Library
- Browser Library vs SeleniumLibrary
- Writing Your First Browser Test
- Sections in Robot Test File
- Robot Resource Files
- Robot Test Templates
- Robot Test Setup & TearDown
- Browser Library Keywords
- CI/CD Integration
- Interview Preparation Page
Discover more from Rotebit
Subscribe to get the latest posts sent to your email.

