Executes the VBScript statements in the specified file. After the file runs, the definitions in the file (functions, subroutines, classes, and so forth) are available in the global scope of the action or component that called the ExecuteFile statement.
The absolute or relative path of the VBScript file to execute.
You cannot debug a file that is called using an ExecuteFile statement, or any of the functions contained in the file. In addition, when debugging a test that contains an ExecuteFile statement, the execution marker may not be correctly displayed.
To enable debugging, use the LoadFunctionLibrary Statement instead of ExecuteFile. This statement provides similar functionality, but also enables you to debug the functions in the function library during run-time.
The ExecuteFile statement utilizes the VBScript ExecuteGlobal statement. For details, see the Microsoft VBScript Language Reference.
The following example executes the MyFunction VBS file in order to use the SomeFunction function in the action script.
ExecuteFile "MyFunctions.vbs" x = SomeFunction ' Defined in MyFunctions.vbs
- CallServiceTest Statement
- CreateObject64 Statement
- DescribeResult Statement
- ExecuteFile Statement
- ExitAction Statement
- ExitActionIteration Statement
- ExitComponent Statement
- ExitComponentIteration Statement
- ExitTest Statement
- ExitTestIteration Statement
- GetLastError Statement
- InvokeApplication Statement
- IsPartialRun Statement
- LoadAndRunAction Statement
- LoadFunctionLibrary Statement
- ManualStep Statement
- Print Statement
- RegisterUserFunc Statement
- RunAPITest Statement
- SetLastError Statement
- UnregisterUserFunc Statement
- Wait Statement