【发布时间】:2019-07-22 15:25:42
【问题描述】:
作为 Robot Framework 中验证的一部分,我有以下数据(存储为 ${response})作为获取请求响应:
{
"interfaces": [
{
"name": "eth0",
"status": "ready",
"macAddress": "xx:xx:xx:xx:xx:xx",
"ipv4": {
"mode": "DHCP",
"address": "127.0.0.1",
"mask": "255.255.255.0",
},
"ipv6": {
"mode": "DISABLED",
"addresses": [],
"gateway": "",
}
}
],
"result": 0
}
我想获取键 ipv4 的值并将其与预定义的值进行比较。我尝试在 HttpLibrary.HTTP 之外使用它,因为 Robot Framework 3.1 将不推荐使用它,所以我想使用 Evaluate。
在 Robot Framework 中是否有可能?
【问题讨论】:
标签: python json robotframework