HyperRobotFrameworkPlugin
HyperRobotFrameworkPlugin copied to clipboard
Add support for keywords defined in python files
In my project keywords are defined in repo in the *.py files.
Example: @keyword(name='New Keyword', allowed_params=[]) def new_keyword():
Python file is imported in the robot file.
When I try to control click the keyword there is a message that keyword definition not found.
The same thing happen with variables inported from *.py file.
it depends on how did you import the library, please provide more details or a minimal example.
It is worth mentioning that in our project resource files (which contains keywords) are in different repo. The structure is as follows: Repo1 (tests): repo_name/tests/folder1/folder2/file_with_tests.robot Repo2 (resources): repo_name/folder1/folder2/folder3/file_with_keywords.py
In file_with_tests.robot another robot file is imported: Resource another_robot_file.robot (repo1) In another_robot_file.robot yet another robot file is imported: Resource yet_another_robot_file.robot (repo1) In yet_another_robot_file.robot the main resource file with keywords is imported: Library file_with_keywords.py (repo2)
This is the structure of our repo. Is there any possibility to make control click work on file_with_tests.robot?
Even when we import resource file directly it does not work: Library file_with_keywords.py
In robot the syntax Library path_to/py_file.py means importing library from python file's relative path against current robot file. You need to make sure the python library's relative path is correct.
You can also try to provide a minimal project to illustrate your issue if you can reproduce it.