Click or drag to resize

ApplicationManagerRunAs Method

Runs an application under another user account and returns the application process object.

Namespace:  SmartBear.TestLeft
Assembly:  SmartBear.TestLeft (in SmartBear.TestLeft.dll) Version: 14.70.237.11 (14.70.237.11)
Syntax
public IProcess RunAs(
	string path,
	string userName,
	string password,
	string commandLine = "",
	string workingFolder = ""
)

Parameters

path
Type: SystemString
The path to the application. Can be specified as a fully-qualified path, as the application name (if the application is in PATH environment variables), or by using environment variables (%PROGRAMFILES%, %USERPFOFILE%).
userName
Type: SystemString
The user name (in the format Domain\UserName) to be used to run the application.
password
Type: SystemString
The user's password.
commandLine (Optional)
Type: SystemString
Command-line arguments for the application.
workingFolder (Optional)
Type: SystemString
The path to the working folder of the application.

Return Value

Type: IProcess
The IProcess object that corresponds to the launched application instance.
Exceptions
ExceptionCondition
WebExceptionThrown if there are network problems.
ApiExceptionThrown if the application cannot be launched.
OldVersionResponseExceptionThrown if an earlier version of the test engine (TestComplete/TestExecute) is used.
See Also