Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var testString = 'To Do List';
- var testSuccess = 'Verify "To Do List" String exists';
- casper.test.begin('Login Tests', 4, function (test) {
- casper.start('http://c3605h5.saig.frd.global').then(function() {
- test.assertTitle("Compliance 360", "Verify homepage title is Compliance 360");
- test.assertExists('form[name="Default"]', "Verify main form exists");
- test.assertExists('#Login', "Verify Login Button exists");
- casper.fill('form[name="Default"]', {
- Organization: 'c3605h5',
- UserName: 'admin',
- Password: 'password'
- }, true);
- });
- casper.then(function() {
- this.click('#Login');
- });
- casper.then(function() {
- test.assertTextExists(testString, testSuccess)
- console.log('After clicking login button, URL is: ' + this.getCurrentUrl());
- });
- casper.run(function () {
- test.done();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement