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