New_ Method

Applies to TestComplete 14.10, last modified on June 5, 2019

The object-driven testing (ODT) functionality is deprecated. Do not use it to create new tests. It will be removed from the product in one of the future releases. As an alternative, you can create custom classes in your scripts. For more information, see Alternatives to the ODT functionality.

Description

The Classes.New_ method creates a new instance of the class whose name is specified by the Name parameter, and returns this instance as an Object object.

Declaration

ClassesObj.New_(Name)

ClassesObj An expression, variable or parameter that specifies a reference to a Classes object
Name [in]    Required    String    
Result An Object object

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

Name

Specifies the name of the class whose instance should be created.

Result Value

The instance of the specified class represented as an Object object.

Note: The class with the specified name must be previously declared using the Declare method. If this class is not declared, an error occurs.

Remarks

New_ is a stub method that calls Classes.New. You should use this method instead of Classes.New in your VB .NET Connected Applications. This is due to pecularities of the VB .NET language, which does not allow the Classes.New notation.

See Also

New Method
Declare Method
Object Object
Creating Connected Applications in Visual Basic .NET

Highlight search results