Page 1 of 1

Application run as admin

Posted: Wed Oct 26, 2016 8:57 am
by msys_mg
Hello there,
i have to setup a test solution, therefore i need first, before starting the application to test, a special tool who emulates a server. This tool must be startet as admin. (Right mouse click "run as admin"). So i need to input username and password for the local admin on the windows dialog.

How can i solve this with ranorex, any ideas?

Thanks
michael

Re: Application run as admin

Posted: Thu Oct 27, 2016 1:22 pm
by jma
Hi,

Did you already try to record the scenario with the Ranorex Recorder? Are you able to recognize the UI of the Windows dialog? Alternatively, I would suggest logging in as administrator from the beginning in order you don't have to do the authentication during test execution.

Re: Application run as admin

Posted: Thu Oct 27, 2016 2:00 pm
by msys_mg
That doesn't work, the last entry in the recorder is the right click on the context menu.

Re: Application run as admin

Posted: Thu Oct 27, 2016 3:55 pm
by krstcs
Ranorex cannot see or interact with the elevation prompt from UAC, nor can any other application, this is a Windows security feature!

Your best bet is to lower the UAC threshold to the lowest setting. This does not turn UAC off, but it does allow elevation without asking for credentials, assuming your user has the appropriate credentials.

NOTE: Your local user MUST have the appropriate permission level/group membership in order to elevate both Ranorex and your AUT on the local system. Also, both Ranorex and the AUT should be started at the same level, as this is the only real way to ensure that they both have the same permissions and that Ranorex can interact correctly with the AUT. While there are some hacks to try to work around this, I would highly recommend not using them because they are not easy or guaranteed to work every time.