Closed zastress closed 4 years ago
In Settings->Languages & Frameworks->Robot Options, The original Intellibot has an option "Allow Transitive Imports", can be ON/OFF. Now it is extened to "Max Transitive Imports Depth", can set to be 0~99, i.e., how many "Library/Resource" is needed to reach that keyword. That is because I work on a large project, there're many resource files cross-referenced deeply. If it is set to ON, the startup time is very long. If it set to OFF fully, then it is very inconvenient. The new design will be a trade-off setting.
In your case, if "Max Transitive Imports Depth" is 0, then in resource1.robot, it will not resolve keywords in resource2.robot. if "Max Transitive Imports Depth" is 1 (default), then in resource1.robot, it will resolve keywords in resource2.robot but will not resolve keywords in SeleniumLibrary (same behaviour as original "Allow Transitive Imports" = OFF). if "Max Transitive Imports Depth" is 2, then in resource1.robot, it will resolve keywords defined in resource2.robot and SeleniumLibrary. If you don't care the performance, you can it to 99 (like original "Allow Transitive Imports" = ON).
Set it to 3 and works just fine. Thanks
I have 2 resource files for robot framework, called resource1.robot and resource2.robot. Inside resource1.robot I have resource2 declared as resource. Inside resource2 I declared SeleniumLibrary inside the
*** Settings ***
section. By default, if I try to call a SeleniumLibrary keyword inside theresource1
file, intellibot should be able to recognize it.The problem: keywords are not recognized.
Solution: Declare
SeleniumLibrary
inside the*** Settings ***
section ofresource1
file also.This is a basic example but it also applies when you have a test that uses a certain resource file and that file is linked with another one that has the library declared.
Same thing for variables.
To be noted that the old intellibot plugin has no problem with this.
To better understand the issue, here is the example
resource1.robot file:
resource2.robot file:
So, in this example, the
Open Browser
keyword called inside resource1 file is not recognized.Feel free to ask more details if this is not clear.
I confirm that this issue is also present on the latest version, the dev-0.10.143.384.
Thanks for your help.