robotframework - 模板关键字无法处理 RF 3.2.1 中的换行符
问题描述
这个测试用例如果在 Robot Framework 3.1.2 中工作正常但在 3.2.1 中我收到错误消息:
设置“模板”只接受一个值,得到 2。
我看不到解释这一点的文档有任何更新。有任何想法吗?
*** Test Cases ***
Test Case
[Template] The result of ${calculation}
... should be ${expected}
1 + 1 2
2 + 2 4
*** Keywords ***
The result of ${calculation} should be ${expected}
${result} = Evaluate ${calculation}
Should Be Equal As Integers ${result} ${expected}
解决方案
...
标记参数边界。您所做的与此完全相同:
[Template] The result of ${calculation} should be ${expected}
就像错误所说的那样,该[Template]
设置只接受一个参数,但您传递了两个参数。您不能在多行上定义关键字。
看来旧的(3.2 之前的)解析器可能有点松懈,允许您将模板关键字拆分为多行。新的解析器不允许这样做。
推荐阅读
- sql - Postgres:如何将 SQL 结果转换为列名和值
- html - 通过 .htaccess 将用户重定向到网页时出现错误“键入 text/html,不是 text/css”
- android - 在 android AMediaCodec_dequeueOutputBuffer 中使用 ndk-camera2 总是返回 -1
- html - 如何风格化输入[类型=颜色]
- firebase - Firebase Unity - 权限缺失或不足
- ios - 当应用程序在前台返回时更新 swiftUI 中的滑块
- keycloak - 首次登录时keycloak从ADFS导入用户信息时如何删除更新帐户信息表单
- python - 获取flask博客、SQL、Python中的平均评分
- swiftui - SwiftUI - 材质组件,文本字段
- c - 数组 c 中的偶数和正数元素