Created By  dmarkovtsev Tuesday, June 26, 2018

Some test scenarios require running processes as different user or entering user credentials into Internet Explorer security prompt.  Rapise can enter user credentials into Windows Security dialog on Windows 10 automatically.

We have a ready test for it in our powerpack repository on GitHub. Just clone the repository and navigate to 'WindowsSecurityPrompt' folder for usage instructions.

WindowsSecurityPrompt

Use this test to enter user credentials into Windows Security dialog on Windows 10.

Usage

For prompt shown by Internet Explorer

  1. Put this function into *.user.js file of your test. Update relative path to this test if necessary.
function EnterCredentialsIE(/**string*/ user, /**string*/ pwd, /**boolean*/ remember)
{
	var params = { userName: user, password: pwd, remember: remember, type: "IE" };
	Global.DoInvokeTest('%WORKDIR%/../WindowsSecurityPrompt/WindowsSecurityPrompt.sstest', params);
}
  1. In your test put this at the beginning of the Test function.
EnterCredentialsIE("<user name>", "<user password>", true);

Or call the function in RVL:

For prompt shown by Run As

  1. Put this function into *.user.js file of your test. Update relative path to this test if necessary.
function EnterCredentialsRunAs(/**string*/ user, /**string*/ pwd)
{
	var params = { userName: user, password: pwd, type: "RunAs" };
	Global.DoInvokeTest('%WORKDIR%/../WindowsSecurityPrompt/WindowsSecurityPrompt.sstest', params);
}
  1. In your test put this at the beginning of the Test function.
EnterCredentialsRunAs("<user name>", "<user password>");

Or call the function in RVL:

Article Info
  • Last Updated: 6/26/2018
  • Article ID: KB351
  • Views: 187