Sie sind auf Seite 1von 2

var manager = new RollupManager();

manager.addRollupRule(
{
name: 'ctsr_Open_Url',
description: 'Open gmail home page.',
args: [
{
name: 'url',
description: 'The url to open.',
exampleValues: ['/primary/livelink.exe?func=LL.getlogin&NextURL=...'
]
}
],
post: 'Accessed in gmail page',
commandMatchers: [
{
command: 'open', target: ".*/*\\?func=.+",
updateArgs: function(command, args)
{
args.url = command.target;
return args;
}
},
{ command: 'assertTitle', target: 'gmail Log-in' }
],
getExpandedCommands: function(args)
{
var commands = [];
commands.push({command: 'open', target: args.url });
commands.push({command: 'assertTitle', target: 'Content Server Log-in'
});
return commands;
}
});
manager.addRollupRule(
{
name: 'ctsr_Do_Login',
description: 'Do Log in as Livelink User.',
args: [
{
name: 'username',
description: 'The username to login as',
exampleValues: ['Admin']
},
{
name: 'password',
description: 'the password to login',
exampleValues: ['livelink']
}
],
post: 'Accessed in Enterprise Workspace as a livelink user',
commandMatchers: [
{ command: 'type', target: 'Username',
updateArgs: function(command, args)
{
args.username= command.value;
return args;
}
},
{ command: 'type', target: 'Password',
updateArgs: function(command, args)
{
args.password= command.value;
return args;
}
},
{ command: 'click.*', target: "ui=livelink::loginBtn\\(\\)" },
{ command: 'assertTitle', target: ".?Enterprise" }
],
getExpandedCommands: function(args)
{
var commands = [];
commands.push({command: 'type', target: 'Username', valu
e:args.username});
commands.push({command: 'type', target: 'Password', valu
e:args.password});
commands.push({command: 'clickAndWait', target: 'ui=livelink::loginBtn()
'});
commands.push({command: 'assertTitle', target: 'regexp:.?Enterprise'
});
return commands;
}
});
manager.addRollupRule({
name: 'ctsr_Do_Logout',
description: 'Do Logout by clicking Log-out link on Tools drop down menu or
dropdown image icon',
post: 'User logged out of livelink, Login page present',
commandMatchers: [
{ command: 'click.*', target: "ui=livelink::globalMenus\\(mLabe
l=Tools\\)" },
{ command: 'click.*', target: "ui=livelink::toolsGlobalMenuItem
\\(iLabel=Log-out\\)" },
{ command: 'assertTitle', target: "Content Server Log-in" }
],
getExpandedCommands: function()
{
var commands = [];
commands.push({command: 'click', target: 'ui=livelink::glo
balMenus(mLabel=Tools)'});
commands.push({command: 'waitForElementPresent', target: 'ui=livelink::t
oolsGlobalMenuItem(iLabel=Log-out)'});
commands.push({command: 'clickAndWait', target: 'ui=livelink::toolsGloba
lMenuItem(iLabel=Log-out)'});
commands.push({command: 'assertTitle', target: 'Content Server Log-i
n'});
return commands;
}
});

Das könnte Ihnen auch gefallen