script.js我正在尝试从本地保存的邮递员集合中运行纽曼。在邮递员中,调用有效,并返回我需要访问的响应主体令牌。
我不在乎如何返回响应正文,如果不需要,我只是不想打开邮递员。
我不断遇到以下错误ReferenceError: responseBody is not defined
任何有关此事的帮助将不胜感激。
$ node script.js
var newman = require('newman'); // require newman in your project
// call newman.run to pass `options` object and wait for callback
newman.run({
collection: require('./pathto/my_coll.postman_collection.json'),
reporters: 'cli'
}, function (err) {
if (err) { throw err; }
// console.log(responseBody);
JSON.parse(responseBody);
});
Run Code Online (Sandbox Code Playgroud)
console.log或似乎JSON.parse都没有达到目的,因为responseBody似乎从一开始就没有定义
穷尽参考:
https://www.getpostman.com/docs/v6/postman/scripts/postman_sandbox
我正在使用wordpress的插件,开发人员使用名称中的[]字符创建了ID.
我无法找出如何用css来定位它们...
<p id="shipping_city[]_field">stuff</p>
Run Code Online (Sandbox Code Playgroud)
所以我试试
#shipping_city[]_field {font-size:24px;}
Run Code Online (Sandbox Code Playgroud)
或者什么......没有运气.
有没有人遇到过这种类型的东西?
我不想更改开发人员html,因为这是一个表单条目,我认为[]有用...