Run Method

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

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 Group.Run method walks down the object hierarchy starting from the given data group and calls object methods at each level of the hierarchy. For more information on what this method does, see Controlling Object-Driven Tests topic.

Declaration

GroupObj.Run()

GroupObj An expression, variable or parameter that specifies a reference to a Group object
Result None

Applies To

The method is applied to the following object:

Result Value

None.

Example

The code below creates a custom object hierarchy and then walks down the object tree starting from the given data group.

JavaScript, JScript

function GroupObjExample()
{
  // Creates a custom object tree
  var Group = ODT.Data.AddGroup("NewDataGroup");
  var Var = Group.AddVariable("MyVariable", 123);
  var Var2 = Group.AddVarOfArrayType.AddItem("MyText");
  // ...
  // Walks down the custom object tree
  ODT.Group.Run();
  
}

VBScript

Sub GroupObjExample

  ' Creates a custom object tree
  Set Group = ODT.Data.AddGroup("NewDataGroup")
  Set Var = Group.AddVariable("MyVariable", 123)
  Set Var2 = Group.AddVarOfArrayType.AddItem("MyText")
  ' ...
  ' Walks down the custom object tree
  ODT.Group.Run()
  
End Sub

DelphiScript

function GroupObjExample;
var Group, Var1, Var2;
begin

  // Creates a custom object tree
  Group := ODT.Data.AddGroup('NewDataGroup');
  Var1 := Group.AddVariable('MyVariable', 123);
  Var2 := Group.AddVarOfArrayType.AddItem('MyText');
  // ...
  // Walks down the custom object tree
  ODT.Group.Run();
  
end;

C++Script, C#Script

function GroupObjExample()
{
  // Creates a custom object tree
  var Group = ODT["Data"]["AddGroup"]("NewDataGroup");
  var Var1 = Group["AddVariable"]("MyVariable", 123);
  var Var2 = Group["AddVarOfArrayType"]["AddItem"]("MyText");
  // ...
  // Walks down the custom object tree
  ODT["Group"]["Run"]();
  
}

See Also

Run Method
Run Method
Run Method
Controlling Object-Driven Tests

Highlight search results