现在我需要编写一个脚本有关的类似:Robotframework:如何使用JSONP在robotframework脚本
${result} set variable {}
create session url http://xxx
${resp} get request url /
should be equal as strings ${resp.status_code} 200
Dictionary Should Contain Value ${resp.jsonp(${result})} Success
log ${resp.jsonp(${result})}
但随着JSONP脚本的URL写。 那么机器人框架如何与jSonp和jSon脚本一起使用? 和它的错误是这样的:
Invalid variable name `${resp.jsonp({})}`.
所有这些是: enter image description here
的JSONP来自url.And URL以JSONP脚本编写。我需要使用RobotFramework获取url接口script.may是我的脚本是错误的。
请花一点时间确保您的问题经过深思熟虑并格式正确。我多次重读这段文字,而且比较无能。从您输入的内容中,您是否使用了请求库?如果你正在使用JSON打我建议你使用http库 – shicky
yes.all的使用是:*** ***设置图书馆 Selenium2Library 图书馆HttpLibrary 图书馆RequestsLibrary 图书馆馆藏 –
如果使用JSON玩,GitHub的有这样的测试:https://github.com/bulkan/robotframework-requests。但我不知道与JSONP脚本。我们的程序员使用JSONP脚本来接口。 –