开发者社区> 问答> 正文

是否可以从机器人框架关键字转到python方法定义?

我想使用键盘快捷键从机器人框架文件中使用python方法。那可能吗?

机器人框架关键字:

Check something
    Given I have my scenario configured
    When I configure something
    Then Something else happens

Library  myClass.py

myClass.py上的Python方法:

from robot.api.deco import keyword

class myClass(object):
    @keyword('I configure something')
    def i_configure_something(self):
        self.configure()

我会用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.

展开
收起
祖安文状元 2020-02-23 16:44:28 6843 0
1 条回答
写回答
取消 提交回答
  • 对的,这是可能的。我们将PyCharm与Intellibot插件一起使用。到目前为止,这是我找到的最佳解决方案。在PyCharm中,我们可以直接从关键字使用python方法 Ctrl+B

    也可以使用带有Red插件的Eclipse来实现,但是我不知道它的快捷方式

    2020-02-23 16:44:34
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载