I am currently automating an application where a pop-up for Windows Authentication appears when a button is clicked. I am using Selenium, Mocha, and JavaScript for automation. I need assistance on how to authenticate through automation.
I attempted to use AutoIT, but it only launches the AutoIT executable and does not input the username and password.
Please help.
Edit AutoIT Script
WinWaitActive("Authentication Required")
Send("username")
Send("{TAB}")
Send("password")
Send("{ENTER}")
Edit Test Code
var testAuthentication = function(){
console.log("Authentication started");
var workerProcess = child_process.execFile('C:/AutoITScript/AutoITScrippt.exe', function(error, stdout, stderr){
if(error) {
console.log("Error stack :: " + error.stack);
console.log("Error code :: " + error.code);
console.log("Signal :: " + error.signal);
}
console.log("stdout :: " + stdout);
console.log("stderr :: " + stderr);
});
workerProcess.on('exit',function(code){
console.log('Child process exited :: Code :: ' + code);
});
}