The Silk4NETInitSession function connects to a Windows Terminal Server session and opens a remote desktop user session. If no user name or password is provided, the function uses the user name and password that are saved in the profile settings. If you want to run the test on your local console, do not set user credentials in the profile settings or the script.
The server may limit maximum color depth. The client cannot force a color depth setting that is higher than is supported by the server. See the Terminal Services Configuration documentation for details about the color-depth limitations of your server version.
By default Silk4NETInitSession raises an error with the severity SEVERITY_PROCESS_EXIT if the function fails to start a valid session. The severity of that error can be adjusted by a custom event handler function. When an error with SEVERITY_PROCESS_EXIT occurs, the rest of the script is ignored and no unsaved results data or measurements will be saved.
SilkTest.bdh
Silk4NETInitSession( in sUser : string optional, in sPassword : string optional, in uColorDepth : number optional, in uDesktopWidth : number optional, in uDesktopHeight : number optional ): boolean;
Parameter | Description |
---|---|
sUser | Optional: The user name of the remote desktop user. If no user name or password is provide,d the function uses the user name and password that are saved in the profile settings. |
sPassword | Optional: The password of the remote desktop user. If no user name or password is provided, the function uses the suer name and password that are saved in the profile settings. |
uColorDepth | Optional: The color depth setting of the remote session. The default color-depth setting is 16 bit. Possible values are one of the
following constants of the
SilkTest.bdh:
|
uDesktopWidth | Optional: The width resolution of the remote session screen in pixels. Default is 1024. |
uDesktopHeight | Optional: The height resolution of th e remote session screen in pixels. Default is 768. |
true if successful
false otherwise
dcltrans transaction TInit begin AttributeGetString("GLTusername",username); AttributeGetString("GLTpassword",password); Silk4NETInitSession(username,password); end TInit; transaction TTest begin Silk4NETExecuteTestcase("Silk4NETTest_v12.UnitTest_Notepad_v12","TestMethod_ShortTest","Timer_TestMethod_ShortTest"); end TTest;