TPS Tab Lists 编辑
A tabs asset list is an array of objects with the following keys:
- uri: the uri of the tab, required.
- title: the title of the tab, optional. If specified, only used during verify actions.
- profile: the name of the profile the tab belongs to. Required for verify actions.
For example:
var tabs1 = [
{ uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html",
title: "Crossweave Test Page 1",
profile: "profile1"
},
{ uri: "data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>",
title: "Hello",
profile: "profile1"
}
];
Tab lists and phase actions
Tabs cannot be modified or deleted, only added or verified with the following functions:
- Tabs.add - opens the specified tabs in the browser window.
- Tabs.verify - verifies that the specified tabs can be found in the specified profile.
- Tabs.verifyNot - verifies that the specified tabs cannot be found in the specified profile.
There are a handful of static pages at http://hg.mozilla.org/services/tps/file/tip/pages which can be used for tab testing, and data: url's can be used as well.
Example
See the TPS tabs unit test: http://hg.mozilla.org/services/tps/f...s/test_tabs.js
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论