The Object Browser contains four tabbed pages that display properties, fields, methods and events of the selected object. The methods and properties are organized into categories to help you easily find the desired methods and properties.
The Properties page holds two columns. The one on the left displays a property’s name, the right column displays its value. You can change the column width by dragging the separator between column headers.
By default, properties are grouped in the following way:
Standard properties are common for multiple objects of different types, for example all objects have the
Extended properties are specific to object types. For example, most edit controls have the
Other properties provide access to internal properties of the application. The name of the category will be different depending on the technology used to create the application.
You can change the way properties are arranged using the Categories sorting settings group in the Object Browser Options menu.
Properties can be read-only, write-only and read-write:
- Read-write properties are marked with the to the left of their names.
- Read-only properties are not marked with any glyphs.
- Executable code may not include the
readmethod for some properties, even though they are read-write in the source code (see Object Properties, Fields and Methods That Are Unavailable to TestComplete). In this case, the properties will appear as write-only (marked with the glyph).
To modify the value of a read-write or write-only property (for instance,
Caption), press F2 or Space. After that, you will be able to edit the property value. All the changes will take effect as soon as you press Enter or move to another property. If an object belongs to an Open Application, you can change all of its properties unless they are defined as read-only in the application code.
If a property refers to an object that implements the
IDispatch interface, the property value column displays an Object value along with an ellipsis button. When you click this button or press Enter, the methods and properties of the object will be displayed in the Object Browser panel. To return to the previous object, click at the top left of the panel.
Indexed properties have the Params button next to the property name. This button allows you to specify an index for which the property value column will display the corresponding value.
If the value of a property holds a list of strings, only a few of the list items are displayed on the Properties page. To view the entire list in a separate dialog box, click . Using the ensuing Multi-Line Dialog you can browse a list of items, copy them to the clipboard and modify the property value (if possible).
If the value of a property holds a picture (for instance,
Sys.Clipboard after you have taken a screenshot), then, along with the ellipsis button, this property will display the button. Clicking the button, you can open the stored image in the Image Viewer.
The Fields page is similar to the Properties Page, except for that it displays fields (data members) for the object selected in the object hierarchy in a format similar to the Properties Page. Object fields are grouped by field accessibility (public, protected and private).
If an object has no (visible) fields, the page will not be displayed. This is always true for Visual C++ Open Applications that use wrapper classes. In these classes, all data members are treated as properties, and therefore they are listed on the Properties page.
The Methods page simply displays method names of the object selected in the object hierarchy. Objects of different types have different sets of methods. For more information on objects and their methods, see Object Tree Models.
Also, the Methods page displays names of actions that can be applied to the selected object. Actions are simulated user inputs; they are available to onscreen objects only.
By default, all methods are grouped in the following way:
Standard methods are common for most objects. For example, the
Actions are specific to object types. For example, most edit controls have the
Other categories provide access to internal methods of the application. The name of the category will be different depending on the technology used to create the application.
You can change the way methods are arranged using the Categories sorting settings group in the Object Browser Options menu.
The Events page holds a list of events of the selected object. You can use this list to ensure that an event is “visible” to TestComplete. For each event displayed in the list you can create a script routine that will run when the event occurs.
This page contains information only if --
The selected object is an ActiveX object that implements the
The application that includes this object is a COM server or it is compiled as Open Application.
In all other cases, the Events page is not displayed, that is, object events (if the selected object has any) are not available to TestComplete. For more information about events, see Handling Events.
Note that the Object Browser pages may not display all members of the selected object. The number of displayed properties and methods depends on the view mode of the Object Browser panel. There are two available view modes: Basic (only basic members are displayed) and Advanced (all object members are displayed). By default, the Basic view mode is set. To change the mode, click the link at the top of the current Object Browser page. For more information, see Basic and Advanced View Modes.