Search code examples
pythonvisual-studio-coderobotframework

Is it possible to go to python method definition from a robot framework keyword?


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 :P

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.

Solution

  • For VSCode, I use Robot Framework Intellisense.