Running Low-Level Procedures

Applies to TestComplete 15.46, last modified on January 09, 2023
Information in this topic applies to desktop and web applications.
Note: You can neither pause, nor stop a running low-level procedure.

Running a Low-Level Procedure From the Project Explorer Panel

  • Expand the Low-Level Procedures Collection item in the Project Explorer panel.

  • Right-click the desired procedure and select Run <Procedure_Name> from the context menu.

Regardless of whether the procedure was recorded for a window or for the entire screen, TestComplete will run the procedure for the entire screen.

Running a Low-Level Procedure as a Test Item

  • Switch to the Project Explorer panel. If it is hidden, choose View | Project Explorer to make the panel visible.

  • Select your project in the Project Explorer and then select View | Organize Tests from the main menu of TestComplete. This will open the Execution Plan editor of the project.

  • Drag the desired low-level procedure from the Project Explorer to the Execution Plan editor. This will create a new test item that runs that low-level procedure.

  • Select File | Save from the TestComplete main menu to save the changes made.

When you run the project or project suite, TestComplete will run the low-level procedure.

Regardless of whether the procedure was recorded for a window or for the entire screen, TestComplete will run the procedure for the entire screen.

Running Low-Level Procedures From Scripts

To run a low-level procedure from a script test, use the LowLevelProcedure.Execute method.

For example:

JavaScript, JScript

LLCollection1.LLP1.Execute();

Python

LLCollection1.LLP1.Execute()

VBScript

LLCollection1.LLP1.Execute

DelphiScript

LLCollection1.LLP1.Execute;

C++Script, C#Script

LLCollection1["LLP1"]["Execute"]();

If you call the Execute method without any parameters, TestComplete will run the procedure for the entire screen (that is, event coordinates recorded by the procedure will be treated as screen coordinates).

To run a procedure for an individual window, pass the appropriate window object to the Execute method. TestComplete will treat coordinates stored by low-level procedures as window-relative coordinates:

JavaScript, JScript

var w = Sys.Process("MyProcess").Window("MyWndClass", "MyWndCaption",1); // Obtains the window
LLCollection1.LLP1.Execute(w);

Python

w = Sys.Process("MyProcess").Window("MyWndClass", "MyWndCaption",1) # Obtains the window
LLCollection1.LLP1.Execute(w)

VBScript

Set w = Sys.Process("MyProcess").Window("MyWndClass", "MyWndCaption",1) ' Obtains the window
Call LLCollection1.LLP1.Execute(w)

DelphiScript

var w;
begin
  w := Sys.Process('MyProcess').Window('MyWndClass', 'MyWndCaption',1); // Obtains the window
  LLCollection1.LLP1.Execute(w);
end;

C++Script, C#Script

var w = Sys["Process"]("MyProcess")["Window"]("MyWndClass", "MyWndCaption",1); // Obtains the window
LLCollection1["LLP1"]["Execute"](w);

Running Low-Level Procedures From Keyword Tests

You run low-level procedures from keyword tests in the same way you do it from script tests, by using the LowLevelProcedure.Execute method. To call the method from a keyword test, use the Call Object Method operation.

Converting Low-Level Procedures to Script Code

To learn how to convert a low-level procedure into a set of script statements and then run the generated code, see Parameterizing Low-Level Procedures.

See Also

LowLevelProcedure Object
Parameterizing Low-Level Procedures
LLPlayer Object
Window- and Screen-Relative Low-Level Procedures
Testing Applications in Low-Level Mode

Highlight search results