Viewing COM Object Properties, Methods and Events

Applies to TestComplete 15.63, last modified on April 23, 2024

The Object Browser lets you view properties and methods of COM objects. To do this, you need to know the COM object’s name, also known as ProgID (for example, Word.Application), or CLSID (for example, {000209FF-0000-0000-C000-000000000046}).

To access COM objects, use the Sys.OleObject(ObjectID, MachineName) property.

Note:

You cannot use TestComplete as a client application for in-process OLE objects, the bitness of which is different than the bitness of TestComplete.

For example, let’s see the properties of Microsoft Word’s COM object, Word.Application:

  1. Select the Sys object and find the OleObject property in its property list. If you do not see this property, switch to the Advanced view mode.

  2. Click the button. The Property Parameters dialog will appear.

  3. Enter Word.Application in the OleObject field and leave the MachineName field empty. These parameters define Word’s COM object on the current computer. Click OK.

    Specifying Microsoft Word's COM object in Object Browser

    Click the image to enlarge it.

    TestComplete will create an instance of the Word.Application object. Note that if Microsoft Word is not running, this will launch it.

  4. Click the ellipsis button in the OleObject property value to view the object properties and methods.

    Properties of Microsoft Word's COM object

    Click the image to enlarge it.

    Note: If you do not see COM object properties, enable the Show hidden members option in the Engines - General options dialog.

Note that you can change the values of writable properties (marked with ) and observe the effect. For example, if Microsoft Word is launched via COM, it is hidden by default. To make it visible:

  • Find the Visible property in the list.

  • Enter True in the property value cell.

See Also

About Object Browser
Sys.OleObject

Highlight search results