Robot_Framework_Notes
Robot_Framework_Notes
The framework is highly extensible and supports integration with various tools and
libraries, such as SeleniumLibrary for web UI testing, DatabaseLibrary for database testing,
and AppiumLibrary for mobile testing. It is platform-independent, supporting Windows,
macOS, and Linux.
1. Easy to Learn and Use: The tabular format and plain text test cases make it accessible to
non-programmers.
2. Extensible with Libraries: Integration with libraries like SeleniumLibrary expands its
capabilities.
3. Cross-platform Support: Runs on Windows, macOS, and Linux, ensuring compatibility
across environments.
4. Keyword Reusability: Promotes modularity, allowing reusable components across
multiple test cases.
5. Data-driven Testing: Built-in support for passing multiple data sets to a single test case.
6. Detailed Reporting and Logging: Generates easy-to-understand HTML reports and logs
with execution details.
7. Community Support: A large and active community provides extensive resources, plugins,
and tools.
8. Integration with CI/CD Pipelines: Seamless integration ensures continuous testing and
delivery.
9. Open-source and Free: No licensing cost makes it an excellent choice for organizations of
all sizes.
Keywords are reusable actions in Robot Framework that represent a specific task or
functionality. They can be built-in, custom-defined, or imported from external libraries.
Types of Keywords:
1. Built-in Keywords: Provided by Robot Framework, e.g., `Log`, `Run Keyword If`.
2. Library Keywords: Provided by external libraries, e.g., `Click Button` from
SeleniumLibrary.
3. User-defined Keywords: Created by users for reusability and readability.
Synchronization ensures that the automation script waits for the web elements to become
available before interacting with them.
Error message validation ensures that the application displays the correct error messages
during invalid scenarios. Example:
Variables in Robot Framework store data that can be reused across the test suite.
Defining Variables:
*** Variables ***
${BASE_URL} https://example.com
${USERNAME} admin
${PASSWORD} admin123
A resource file is used to store common keywords, variables, and settings that can be reused
across multiple test cases.
Advantages:
1. Promotes reusability and modularity.
2. Simplifies test case maintenance.
3. Reduces duplication of code.