如何将关键字的结果传递给机器人框架模板?
How to pass the result of a keyword to a roboframework template?
我是 运行 模板化测试,我想将当前日期或 None 作为第三个参数传递给模板。
Completeness
[Documentation] All the fields must be set or the it would fail
[Tags] new-antifraud
[Template] When we update the record with id ${id} outcome ${outcome} datetime ${update_datetime} the result should be ${result}
Id1 Accept '${Get Current Date UTC}' John Ok
Id2 None '${Run Keyword Get Current Date UTC}' Mark Error
None Accept '${Run Keyword Get Current Date UTC}' Susan Error
是否有允许获得此行为的正确语法?
目前,不,robot 没有允许调用关键字并将结果用作另一个关键字的参数的语法。不过,你当然可以写你的模板关键字,要求你传入一个关键字作为参数,模板关键字可以运行你的关键字。
用于内联关键字评估的机器人框架问题跟踪器中存在未解决的问题:issue #3187
我是 运行 模板化测试,我想将当前日期或 None 作为第三个参数传递给模板。
Completeness
[Documentation] All the fields must be set or the it would fail
[Tags] new-antifraud
[Template] When we update the record with id ${id} outcome ${outcome} datetime ${update_datetime} the result should be ${result}
Id1 Accept '${Get Current Date UTC}' John Ok
Id2 None '${Run Keyword Get Current Date UTC}' Mark Error
None Accept '${Run Keyword Get Current Date UTC}' Susan Error
是否有允许获得此行为的正确语法?
目前,不,robot 没有允许调用关键字并将结果用作另一个关键字的参数的语法。不过,你当然可以写你的模板关键字,要求你传入一个关键字作为参数,模板关键字可以运行你的关键字。
用于内联关键字评估的机器人框架问题跟踪器中存在未解决的问题:issue #3187