Forum Discussion

John_smith's avatar
John_smith
Occasional Contributor
9 years ago

Soap UI Automation script is not running automatically until users run it Manually

Whenever access token is expired or whenever we are restarting the system, SOAP UI is not running the Automation Script to retrieve the Access Token. It is redirecting to oauth log in page and not refreshing the Access Token. If I go to the Automation Script editor and manually running it then this is working. Can you please help me to call the script automatically whenever my Token expired/invalid/blank access token is there?

 

If you see the ReadyAPI log I am getting the error message repeatedly 3-4 times.

  • ERROR:An error occurred [Unable to refresh expired access token.], see error log for details
  • INFO:The access token has expired, trying to refresh it.
  • ERROR:An error occurred [Unable to refresh expired access token.], see error log for details
  • INFO:The access token has expired, trying to refresh it.
  • ERROR:An error occurred [Unable to refresh expired access token.], see error log for details
  • INFO:The access token has expired, trying to refresh it.
  • An error occurred [Unable to refresh expired access token.], see error log for details

 

Seems like Automation script editor not communicating with the Soap Ui directly.

 

Code that I am using:

 

function consent(){
document.getElementById('loginform').click();
}

if (document.getElementById('login')) {
document.getElementById('login').value = 'user.name@type.com';
document.getElementById('password').value = 'xxxxxx';
document.loginform.submit();
}

else if (document.getElementById('loginform')){
window.setInterval(content,100);
}