Robot Framework PythonLibCore (version 4.5.0) is a generic component designed to simplify the creation of larger, more flexible test libraries for Robot Framework using Python. It abstracts away the complexities of the Robot Framework's hybrid and dynamic library APIs, providing a streamlined interface. The library is actively maintained with frequent releases addressing bug fixes, performance enhancements, and compatibility with new Python and Robot Framework versions. It is widely used by other popular Robot Framework libraries like SeleniumLibrary and Browser library.
pip install robotframework-pythonlibcoreVerified import paths — ran on the pinned version, not inferred.
This example demonstrates creating a Robot Framework test library using `DynamicCore` from `robotlibcore`. It defines two separate classes (`LibraryComponent1`, `LibraryComponent2`) that contain keywords, decorated with `@keyword`. These components are then passed to the `DynamicCore`'s constructor in the main `MyLibrary` class. It also shows a keyword directly implemented in the main library class.
Upgrade to Python 3.8 or newer, or pin `robotframework-pythonlibcore` to `<4.2.0`.
Always check the release notes for `robotframework-pythonlibcore` to ensure compatibility with your Robot Framework version. Upgrade or downgrade `robotframework-pythonlibcore` as needed.
Upgrade to `robotframework-pythonlibcore` version 4.4.1 or newer to avoid this issue.
If your library is in `mylibrary.py` and the class is `MyLibrary`, import it as `Library mylibrary.MyLibrary` or ensure `mylibrary.py` is directly in the Python module search path and can be imported as `Library mylibrary` (where the module's `__init__.py` or the module itself exposes `MyLibrary`).
Let `DynamicCore` handle keyword discovery by decorating methods with `@keyword` and passing component instances to `DynamicCore.__init__`.
Upgrade to `robotframework-pythonlibcore` version 4.5.0 or newer.