garris / garris/BackstopJS

Login script in onBefore.js is not working

Open
#469 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

I have pages which required login to validate and I am using below login script in onbefore.js but it is not working.
Please let me know if I am using the right login script, I am not seeing any errors in log either.

// EXAMPLE: LOGIN BEFORE RUNNING TESTS
module.exports = function(casper, scenario, vp) {
casper.thenOpen(scenario.url, function(){
if (this.exists('form#user-login-form')) {
this.fill('form#loginForm',{
'username': 'XXXXXX',
'password': 'XXXXXX'
}, true);
}
});
};

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.