Objects.StoredObject Property

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

Use the StoredObject property to obtain a scripting interface to property collections saved to the Stores project items.

Declaration

Objects.StoredObject(Name)

Read-Only Property A StoredObject object
Name [in]    Required    String    

Applies To

The property is applied to the following object:

Parameters

The property has the following parameter:

Name

Specifies the name of the desired property collection in the Objects collection of the Stores project item. Collection names are shown in the Name column of the Objects editor.

Property Value

A StoredObject that provides a scripting interface to the desired property collection. Using this object, you can view and change property values stored to the collection.

Remarks

If you use Python or DelphiScript, you should enclose the parameter of the Objects.StoredObject property in square brackets: Objects.StoredObject[Name].

If the specified collection does not exist, StoredObject returns an empty value (Nothing in VBScript, None in Python, null in JavaScript, JScript, C++Script and C#Script, and nil in DelphiScript) and posts an error message to the test log.

Example

The following example demonstrates how you can access the desired property collection and compare the values of the stored properties with the actual values.

JavaScript, JScript

p = Sys.Process("MyProcess");
// Obtains a scripting interface to the desired property collection
StoredCollection = Objects.StoredObject("MyCollecion");
// Compares the stored values with actual values
StoredCollection.Check(p);

Python

p = Sys.Process("MyProcess")
# Obtains a scripting interface to the desired property collection 
StoredCollection = Objects.StoredObject("MyCollecion")
# Compares the stored values with actual values 
StoredCollection.Check(p)

VBScript

Set p = Sys.Process("MyProcess")
' Obtains a scripting interface to the desired property collection
Set StoredCollection = Objects.StoredObject("MyCollecion")
' Compares the stored values with actual values
Call StoredCollection.Check(p)

DelphiScript

p := Sys.Process('MyProcess');
// Obtains a scripting interface to the desired property collection
StoredCollection := Objects.StoredObject('MyCollecion');
// Compares the stored values with actual values
StoredCollection.Check(p);

C++Script, C#Script

p = Sys["Process"]("MyProcess");
// Obtains a scripting interface to the desired property collection
StoredCollection = Objects["StoredObject"]("MyCollecion");
// Compares the stored values with actual values
StoredCollection["Check"](p);

See Also

Stores
About Objects Collection
Modifying Property Collections in Stores
Name Property
Update Method

Highlight search results