By default, TestComplete launches tested applications under the same user account under which TestComplete itself had been launched. At other times, however, it stands to reason one should be able to verify workability of the application under a different account name(s), for example, one with restricted permissions, and so on. To this end, the Run As option of the tested application has been specifically earmarked.
Create a new user in the system:
user1
), a password and disable the User must change password at next logon option.Add the Calculator Plus application to TestedApps and make sure it appears as a commonplace Windows application, as it's being launched (that is, the View | Classic View option has been enabled).
In order to run a tested application as a different user we need to perform the following steps:
TestedApps.CalcPlus.Run()
command in the script.When we have changed the launching parameters of the calculator by setting the Classic View option, these customizations were saved for the current user. For a newly created user, it was the very first calculator application launch, and that's why default settings were applied. If we set the settings to Classic View once again (after calculator had been launched from under the user1
account name), the settings would have to be saved to be accounted for upon subsequent launches of the application.
3.129.42.134