通过编写user-extension.js文件,整合常用的脚本功能
var manager = new RollupManager();
manager.addRollupRule({
name:'login_commands',
description:'log in to 126.com',
args:[],
commandMatchers:[],
getExpandedCommands:function(args){
var commands = [];
commands.push(
{
command:'open',
target:'http://www.126.com/', //126邮箱地址
}
);
commands.push({
command:'type',
target:'name=email',
value:'xxxxx'
});
commands.push({
command:'type',
target:'name=password',
value:'xxxxx'
});
commands.push({
command:'clickAndWait',
target:'id=dologin'
});
return commands;
}
})