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:
-
Select the
Sys
object and find theOleObject
property in its property list. If you do not see this property, switch to the Advanced view mode. -
Click the button. The Property Parameters dialog will appear.
-
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.
TestComplete will create an instance of the
Word.Application
object. Note that if Microsoft Word is not running, this will launch it. -
Click the ellipsis button in the
OleObject
property value to view the object properties and methods.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.