Is it possible to go to python method definition from a robot framework keyword?
Question:
I want to use the keyboard shortcut to go a python method from robot framework files. Is that possible?
Robot framework keyword:
Check something
Given I have my scenario configured
When I configure something
Then Something else happens
Library myClass.py
Python method on myClass.py:
from robot.api.deco import keyword
class myClass(object):
@keyword('I configure something')
def i_configure_something(self):
self.configure()
I’ll explain what I want using Gherkin 😛
Given I am using VS Code to edit my files
When I highlight the keyword "I configure something"
And I press F12
Then I want it to open my python file and go directly to the method definition.
Answers:
Yes, it is possible. We use PyCharm with Intellibot plugin. It is the best solution I have found so far. In PyCharm we can go to a python method right from the keyword using Ctrl+B
It can also be achieved using Eclipse with Red plugin but I don’t know the shortcut for the same.
For VSCode, I use Robot Framework Intellisense.
I use Pycharm for over 2 years and i use the Plugins:
- Robot Framework Support
- IntelliBot @SeleniumLibrary Patched (wo work with selenium keywords also… since we change from Selenium2Library to SeleniumLibrary)
I want to use the keyboard shortcut to go a python method from robot framework files. Is that possible?
Robot framework keyword:
Check something
Given I have my scenario configured
When I configure something
Then Something else happens
Library myClass.py
Python method on myClass.py:
from robot.api.deco import keyword
class myClass(object):
@keyword('I configure something')
def i_configure_something(self):
self.configure()
I’ll explain what I want using Gherkin 😛
Given I am using VS Code to edit my files
When I highlight the keyword "I configure something"
And I press F12
Then I want it to open my python file and go directly to the method definition.
Yes, it is possible. We use PyCharm with Intellibot plugin. It is the best solution I have found so far. In PyCharm we can go to a python method right from the keyword using Ctrl+B
It can also be achieved using Eclipse with Red plugin but I don’t know the shortcut for the same.
For VSCode, I use Robot Framework Intellisense.
I use Pycharm for over 2 years and i use the Plugins:
- Robot Framework Support
- IntelliBot @SeleniumLibrary Patched (wo work with selenium keywords also… since we change from Selenium2Library to SeleniumLibrary)