python - 是否可以从机器人框架关键字转到 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.
解决方案
我使用 Pycharm 超过 2 年,我使用插件:
- 机器人框架支持
- IntelliBot @SeleniumLibrary 已修补(也可以使用 selenium 关键字......因为我们从 Selenium2Library 更改为 SeleniumLibrary)
推荐阅读
- laravel - 在 Laravel 选择查询中出现 500 内部服务器错误
- php - Laravel Passport 为 API 生成刷新令牌
- excel - Excel:使用文本和数字继续序列
- java - 有没有办法在java(Android)中的类之间共享异步代码?
- javascript - 使用枚举中的键创建类型隐含“任何”问题[角度]
- php - 使用 php 和 jquery 的安全计算表单
- javascript - 由于组件中的解构属性,Jest 测试无法进行快照和其他测试用例
- javascript - 对于模型“Product”的路径“_id”处的值“ascendPrice”,Cast to ObjectId 失败是什么?
- r - 将数据集与“数据框”合并,列名从 ; 到。,为什么?
- java - Java从内部类访问本地数组