Objects.Update Method

Applies to TestComplete 15.69, last modified on November 13, 2024

Description

Use the Update method to update a property collection with values of the specified object.

Declaration

Objects.Update(AObject, Name)

AObject [in]    Required    A tested object    
Name [in]    Required    String    
Result Boolean

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

AObject

The tested object whose property values will be stored to the property collection specified by the Name parameter.

Name

Specifies the property collection name in the Objects collection of the Stores project item.

Result Value

True if TestComplete successfully updated all property values. False otherwise.

Example

The following code demonstrates how you can use the Update method in your scripts:

JavaScript, JScript

function Update()
{
  var p;
  
  p = Sys.Process("MyProcess");
  Objects.Update(p, "Process_MyProcess");
}

Python

def Update():
  p = Sys.Process("MyProcess")
  Objects.Update(p, "Process_MyProcess")

VBScript

Sub Update
  Set p = Sys.Process("MyProcess")
  Objects.Update p, "Process_MyProcess"
End Sub

DelphiScript

procedure Update;
var
  p : OleVariant;
begin
  p := Sys.Process('MyProcess');
  Objects.Update(p, 'Process_MyProcess');
end;

C++Script, C#Script

function Update()
{
  var p;
  
  p = Sys["Process"]("MyProcess");
  Objects["Update"](p, "Process_MyProcess");
}

See Also

StoredObject Property
Compare Method
About Objects Collection
Adding Property Collections to Stores
Modifying Property Collections in Stores
About Objects Collection

Highlight search results