Window Object Methods

Applies to TestComplete 14.10, last modified on June 5, 2019

The following methods are common for all window objects.

Method List   | View

Standard

This category includes methods that TestComplete applies to all test objects.

Name Description
Child Returns a child object by its index.
Find Searches for a child object that has the specified property values.
FindAll Returns an array of child objects that have the specified property values.
FindAllChildren Returns an array of child objects that have the specified property values.
FindChild Searches for a child object that has the specified property values.
FindChildEx Searches for a child object that has the specified property values during the specified timeout period.
FindEx Searches for a child object that has the specified property values during the specified timeout period.
FindId Returns a child object by its identifier.
NavigateTo Obsolete. This method is only added to those window objects that correspond to WebBrowser controls and to Firefox window that display web pages. The method navigates to the specified web page in the browser.
ObjectFromPoint Returns the window or the onscreen object that contains the pixel with the specified coordinates.
OpenFile This method is applied to window objects that correspond to the standard Open File dialogs. It simulates selecting the specified file in the dialog.
Picture Captures the image of the specified rectangular area of the object.
Refresh Refreshes the child object list.
SaveFile This method is applied to window objects that correspond to the standard Save File dialog. It simulates selecting the specified file in the dialog.
ScreenToWindow Converts screen coordinates to coordinates relative to the object.
ToUrl This method is only added to those window objects that correspond to WebBrowser controls and to Firefox’s window that display web pages. The method opens the specified web page in the browser and returns the Page object that corresponds to the loaded web page.
Validate Obsolete. Generates the OnValidate event for the object.
Wait This method is only added to those window objects that correspond to WebBrowser controls and to Firefox’s window that display web pages. The method delays the script execution until the current web page is completely loaded in the browser.
WaitChild Waits until the specified child object becomes available during the timeout period.
WaitProperty Waits until the specified object property achieves the specified value during the timeout period.
WaitWindow Delays script execution until the specified child window is created, or until the specified time period is over.
Window Returns a child window of the given window.
WindowToScreen Converts coordinates relative to the object to screen coordinates.
Actions

This category includes methods that simulate user actions on the tested controls.

Name Description
Activate Brings up a window and switches the input focus to it.
Click Simulates a click of the left mouse button over the object.
ClickM Simulates a click of the middle mouse button over the object.
ClickR Simulates a click of the right mouse button over the object.
Close Closes a window.
DblClick Simulates a double-click of the left mouse button over the object.
DblClickM Simulates a double-click of the middle mouse button over the object.
DblClickR Simulates a double-click of the right mouse button over the object.
Drag Simulates a dragging event performed with the left mouse button.
DragM Simulates a dragging event performed with the middle mouse button.
DragR Simulates a dragging event performed with the right mouse button.
HoverMouse Simulates moving the mouse pointer to the specified position within an object.
Keys Sends a keystroke to an object.
Maximize Maximizes a window.
Minimize Minimizes a window.
MouseWheel Simulates rotation of the mouse wheel over an object.
Position Sets the window size and position on screen.
Restore Restores the size and position of a minimized or maximized window.
SetFocus Moves the input focus to an object.
Open App Objects

This category includes methods that provide access to child objects (windows or controls) that the tested window may have. In general case, a child object can be created with any supported development tool or technology. That is why the category includes methods for accessing objects whose technology differs from the technology of the given window object.

Name Description
AWTObject Provides scripting access to windows of Java AWT applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
CLXObject Provides scripting access to windows of Delphi and C++Builder Open Applications created with CLX classes. The returned object contains methods and properties defined in TestComplete and in the application code.
JavaFXObject Provides access to windows of JavaFX applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
MSAAObject Provides scripting access to objects exposed by the IAccessible interface.
Page This method is only added to those window objects that correspond to WebBrowser controls and to Firefox’s window that display web pages. The method returns the Page object corresponding to the browser control displaying the web page.
QtObject Provides scripting access to windows of Qt applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
SwingObject Provides scripting access to windows of Java Swing applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
SWTObject Provides scripting access to windows of Java SWT applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
TextObject Provides scripting access to objects exposed by the Text Recognition plugin.
UIAObject Provides access to a child object, whose properties and methods are exposed via the UI Automation Support plugin. The returned object contains methods and properties defined by TestComplete, and methods, and properties provided by the Microsoft UI Automation Framework.
UIPage This method is only available if the Web Testing and Firefox Support plugins are installed in TestComplete.

The method is added to the window that corresponds to the Firefox browser window. It returns the object that provides access to toolbars, menus, buttons, edit boxes and other controls of the browser.

VBObject Provides scripting access to windows of Visual Basic 6.0 applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
VCLNETObject Provides scripting access to windows of .NET Open Applications created with Borland VCL.NET. The returned object contains methods and properties defined both in TestComplete and in the application code.
VCLObject Provides scripting access to windows of Delphi and C++Builder Open Applications. The returned object contains methods and properties defined both in TestComplete and in the application code.
WaitAWTObject Delays the script execution until the specified window or onscreen object of a Java AWT application becomes available to TestComplete, or until the specified time period is over.
WaitCLXObject Delays the script execution until the specified window or onscreen object of a CLX Open Application becomes available to TestComplete, or until the specified time period is over.
WaitJavaFXObject Delays the script execution until the specified window or onscreen object of a JavaFX application becomes available to TestComplete, or until the specified time period is over.
WaitMSAAObject Delays the script execution until the specified object exposed by methods of the IAccessible interface become available to TestComplete, or until the specified time period is over.
WaitPage This method is only added to those window objects that correspond to WebBrowser controls and to Firefox’s window displaying web pages. The method delays the script execution until the specified web page is loaded in the browser or until the specified timeout limit is reached.
WaitQtObject Delays the script execution until the specified window or onscreen object of a Qt application become available to TestComplete, or until the specified time period is over.
WaitSwingObject Delays the script execution until the specified window or onscreen object of a Java Swing application become available to TestComplete, or until the specified time period is over.
WaitSWTObject Delays the script execution until the specified window or onscreen object of a Java SWT application become available to TestComplete, or until the specified time period is over.
WaitTextObject Delays the script execution until the specified window or onscreen object exposed by the Text Recognition plugin becomes available to TestComplete, or until the specified time period is over.
WaitUIAObject Delays the script execution until the specified window, whose methods and properties are exposed by the UI Automation Support plugin, becomes available to TestComplete, or until the specified timeout is over.
WaitVBObject Delays the script execution until the specified window or onscreen object of a Visual Basic 6.0 application becomes available to TestComplete, or until the specified time period is over.
WaitVCLNETObject Delays the script execution until the specified window or onscreen object of a .NET application created with the Borland VCL.NET library becomes available to TestComplete, or until the specified time period is over.
WaitVCLObject Delays the script execution until the specified window or onscreen object of a VCL Open Application becomes available to TestComplete, or until the specified time period is over.
WaitWFCObject Delays the script execution until the specified window or onscreen object of a Java WFC application (Microsoft J++) becomes available to TestComplete, or until the specified time period is over.
WaitWinFormsObject Delays the script execution until the specified window or onscreen object of a .NET application created with the Microsoft Windows Forms library becomes available to TestComplete, or until the specified time period is over.
WaitWPFObject Delays the script execution until the specified window or onscreen object of a WPF application becomes available to TestComplete, or until the specified time period is over.
WFCObject Provides scripting access to windows of Java applications created with the WFC library (for instance, a Microsoft J++ application). The returned object contains methods and properties defined both in TestComplete and in the application code.
WinFormsObject Provides scripting access to windows of .NET applications created with Microsoft Windows Forms library. The returned object contains methods and properties defined both in TestComplete and in the application code.
WPFObject Provides scripting access to windows and controls of a WPF application. The returned object contains methods and properties defined both in TestComplete and in the application code.
<Name Mapping>

These methods are available only if the test object has been mapped (see Name Mapping). You can use them in your tests, but they are not displayed in the Object Browser panel.

Name Description
AddNamedChild Adds the specified child object to Name Mapping.
GetUnderlyingObject Returns the test object, to which the given mapping item corresponds.
RefreshMappingInfo Instructs TestComplete to re-identify the mapped object using the identification information specified in Name Mapping.
RemoveNamedChild Deletes the specified child mapped object from Name Mapping.
WaitAliasChild Waits until the child object with the specified alias becomes available during the timeout period.
WaitNamedChild Waits until a child object with the specified mapped name becomes available during the timeout period.
Other Categories

If TestComplete has access to internal methods, properties and files of your tested application (that is, if it is an Open Application), you can call the internal methods and properties as methods and properties of the appropriate test objects. You can view these properties and methods in corresponding categories (Private, Public, RTTI, Debug Agent, Firefox, and so on). These methods and properties are not described in the TestComplete help file. For more information on them, please see the documentation for the development tools that was used to create the application under test.

See Also

Window Object Properties

Highlight search results