TPS Formdata Lists 编辑
A Formdata asset list is an array of objects, each with the following properties:
- fieldname: required.
- value: required.
- date: the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago. Optional, defaults to 0.
For example:
var formdata1 = [
{ fieldname: "testing",
value: "success",
date: -1
},
{ fieldname: "testing",
value: "failure",
date: -2
},
{ fieldname: "username",
value: "joe"
}
];
Formdata lists and phase actions
You can use the following functions in phase actions for formdata lists:
- Formdata.add
- Formdata.delete
- Formdata.verify
- Formdata.verifyNot
For an example, see the TPS formdata unittest: http://hg.mozilla.org/services/tps/f...st_formdata.js
Notes
Note 1, TPS supports the delete action for Formdata, but Sync currently does not correctly sync deleted form data, see bug 564296.
Note 2, Sync currently does not sync Formdata dates, so the date field is ignored when performing verify and verify-not actions. See bug 552531.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论