Application NameEdaptext
PublisherBedford, Freeman and Worth
Date Entered09/01/2016
Date Modified
webNetwork Version 6.4.0.26
Delivery MethodwebPass Client
ConfigurationLINK:
Standard URL: https://bfw.thecopia.com/index.html#/login


FORM:
Form Type: webPass
Login URL: https://bfw.thecopia.com/index.html#/login
Trigger Url: https://bfw.thecopia.com/index.html#/login
Login Page Launch: Enabled
Form Identifier: Form
Form Input(s):
igtxtLoginID=USERNAMEVARIABLE
igtxtPassword=PASSWORDVARIABLE

Script:
function populateCredentials() {
var userEls = document.getElementsByName("usernameOrEmail");
var passEls = document.getElementsByName("password");

if(userEls.length > 0 && passEls.length > 0){
var username = userEls[0];
var password = passEls[0];

username.value = "USERNAMEVARIABLE"
updateModel(username);

password.value = "PASSWORDVARIABLE"
updateModel(password);

setTimeout(clickLoginButton, 1000);
}
}

function updateModel( element ) {
var event = new Event( 'change' );
element.dispatchEvent(event );
}

function clickLoginButton(){
var buttons = document.getElementsByTagName("button");
if(buttons.length > 0){
var button = buttons[0];
button.click()
}
}

setTimeout(populateCredentials, 1000);
 
Notes

1. Replace all occurrences of USERNAMEVARIABLE and PASSWORDVARIABLE with the proper variables appropriate for your system, in the Script and in the form inputs.