Generating Script Code

Applies to TestComplete 15.40, last modified on March 25, 2022

Custom actions created with script extensions can generate code for users. This can be, for example, the code of custom checkpoints, the code generated based on the visually specified options, and so on.

The topics in this section describe the TestComplete syntax subsystem, which is responsible for code generation, and provide detailed instructions on generating various code statements.

About Syntax Subsystem

Describes the subsystem that is responsible for generating script code from script extensions.

Knowing User's Scripting Language

Explains how to determine the scripting language of the user’s project.

Generating Variable Declarations

Explains how to generate variable declaration statements.

Generating Variable Expressions

Explains how to generate an expression that refers a variable.

Generating Routine Calls

Explains how to generate procedure and function calls.

Generating Object Property Expressions

Explains how to generate an expression that refers to an object’s property.

Generating Object Method Calls

Explains how to generate calls to object methods.

Generating Process, Window and Onscreen Object References

Explains how to generate Sys.Process(...).Window(...) expressions.

Generating Assignment Statements

Explains how to generate a statement that assigns a value to a variable or an object’s property.

Generating Comparison and Logical Expressions

Explains how to generate comparison and logical statements, which can be used in conditions.

Generating Conditional Statements

Explains how to generate if…then…else statements.

Generating Comments

Explains how to generate comment statements.

Generating Statement Collections

Explains how to create collections (blocks) of statements.

Using Generated Code

Described how record-time and design-time actions created with script extensions can utilize the generated code.

See Also

Creating Custom Actions
Working With the Code Editor
Creating Script Extensions
Script Extensions

Highlight search results