OnCreate Event

Applies to TestComplete 15.68, last modified on October 03, 2024

Occurs when a new instance of the operation is created.

Declaration

OnCreate(DataParameters) Parameters
Data [in] Required Object
Parameters [in] Optional Object

Description

The OnCreate event occurs when a new instance of the operation has been created. This happens in the following cases:

  • The user adds the operation from the operations palette to a keyword test. The OnSetup event is then raised.

  • The user copies the operation to the clipboard.

  • The user pastes the operation from the clipboard.

  • TestComplete reads the test data from a file.

  • TestComplete records the operation. (The OnGenerate event then occurs.)

The event handler serves as the operation initializer. It is usually used to initialize values of the operation’s parameters and internal fields.

Parameters

The event has the following parameters:

Data

An object that provides access to the operation fields. This object contains properties that correspond to individual operation fields and whose names coincide with the field names.

Parameters

An object that provides access to the operation parameters. This object contains properties that correspond to individual operation parameters and whose names coincide with the parameter names.

Note for VBScript users: If the operation does not have parameters, this argument must be absent in the event handler’s arguments list.

See Also

Events Reference
OnExecute Event
OnSetup Event
OnGenerate Event

Highlight search results