Validate Method

Applies to TestComplete 14.71, last modified on April 22, 2021
This method is obsolete. See the Remarks section below.

Description

Generates the OnValidate event for the testObjectObj object. You can use this event to check whether some object properties are valid.

Declaration

TestObj.Validate(Params)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Params [in]    Optional    Variant Default value:    
Result None

Applies To

All processes, windows, controls and onscreen objects.

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameter:

Params

Parameter(s) that will be passed to the OnValidate event handler. This can be either a single object or value, or an array of values.

Result Value

None.

Remarks

This method is obsolete. It is supported for backward compatibility only. To validate object properties, use property checkpoints.

Example

JavaScript, JScript

var P = new Array(3);
P[0] = 1;
P[1] = "String";
P[2] = false;
Obj.Validate(P);
// Obj is the object to be validated. It can be any tested object (window, process, etc).

Python

P = []
P.append(1)
P.append("String")
P.append(False)
Obj.Validate(P)
# Obj is the object to be validated. It can be any tested object (window, process, etc).

VBScript

Dim P(2)
P(0) = 1
P(1) = "String"
P(2) = False
Obj.Validate P
' Obj is the object to be validated. It can be any tested object (window, process, etc).

DelphiScript

P := CreateVariantArray(0, 2);
P[0] := 1;
P[1] := 'String';
P[2] := false;
Obj.Validate(P);
// Obj is the object to be validated. It can be any tested object (window, process, etc).

C++Script, C#Script

var P = new Array(3);
P[0] = 1;
P[1] = "String";
P[2] = false;
Obj["Validate"](P);
// Obj is the object to be validated. It can be any tested object (window, process, etc).

See Also

About Property Checkpoints
About Object Checkpoints
OnValidate Event

Highlight search results