Keywords under Run Keywords are not recognized
See original GitHub issueKeywords provided as arguments for Run Keywords are not recognized as keywords, thus do not support ‘go to declaration’ feature. I’m using PyCharm 2020.3.5 with RFLS plugin v0.11.1.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Keywords not recognized - Robot Framework
Hi, I seem to have ran into some issues with my IDE (VSC and Pycharm) Even though I can run tests in my...
Read more >':For' loop under 'Run Keywords' not recognized even after ...
Now here in a certain condition, my code has a for loop which isn't recognised by Run Keywords. Any help would get me...
Read more >Keywords not recognized in Visual Studio Code
Keywords are nor recognized with the Robocorp Visual Studio Code extension. It's does not detect keywords and variables from .robot and .py ...
Read more >Robotframework - error when using Run Keyword If /ELSE
But I always get error: 'Else' is a reserved keyword. It must be in uppercase (ELSE) when used as a marker with 'Run...
Read more >BuiltIn - Keyword Documentation - Robot Framework Hub
Many keywords, such as `Evaluate`, `Run Keyword If` and `Should Be True`, accept an expression that is evaluated in Python. These expressions are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just some of my personal thoughts on the technical side of why this is not exactly simple and why it currently works like it does:
This is of course partially thanks to the type of the upstream objects inputs’ being
strand*argsinstead of the corresponding Keword or function.https://github.com/robotframework/robotframework/blob/b68e2b689515446056e53edd67bc23c4c1fd8be0/src/robot/libraries/BuiltIn.py#L1856
In general properly typing Robot Framework’s higher order keywords would be quite interesting. And perhaps would also enable auto completion and validation for them when using python LSP when programming Robot.
But fixing it upstream is probably out of scope for Robot LSP. Most likely there are way easier ways to just figure out completion for them keyword-by-keyword for example. Perhaps by using the metadata from the
@run_keyword_variantdecorator that most such methods have. But that feature is supposed to be deprecated at some point https://github.com/robotframework/robotframework/issues/2190.The same is true for all Builtin keywords that run other keywords. Autocomplete and highlighting is also not supported for keywords that are used as argument.