在响应请求时,我有以下内容:
"comp":[
{
"type":"header",
"version":1,
"settings":
{"logo":"mylogo",
"logoPosition":"left",
"inverseLogosPosition":false,
"headerTitle":"My Report",
"headerTitlePosition":"left",
"pageBreak":false
}
},
我想断言设置的内容。例如,我尝试这个来断言 logoPosition = "left"
断言 json.components.settings[0].logoPosition[0] == "left"
它不工作
这部分运行良好:
assert json.comp.type[0] == "header"
assert json.comp.version[0] == 1
请任何帮助,谢谢