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);
}
2. 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);
}
In your test put this at the beginning of the Test
function.
EnterCredentialsRunAs("<user name>", "<user password>");
Or call the function in RVL: