On this page of the Add Object wizard, you can specify the window, control or object whose data you want to store in the Stores | Objects collection of your project. You can use the stored data in your tests as a baseline data when verifying the actual object in the application.
Note for mobile testing: To store object data in a mobile application, select the object on the Mobile Screen (make sure the Mobile Screen window is not hidden before selecting the object). Also note that the application under test and the mobile device, where the application is running, must be prepared for testing in order for TestComplete to be able to access the application’s objects.
Connecting to Mobile Device Clouds and Opening Testing Sessions
Preparing for Android Testing (Legacy Mobile Support)
You can specify the object to store in one of the following ways:
-
Drag the target to point to the object
Drag the target glyph () to the desired object and drop it when the red frame appears around the object.
To select an object in a mobile application, drag the target glyph to the desired object on the Mobile Screen (see Select an Object on the Mobile Screen).
-
Point and press a shortcut
Click the button, and then move the mouse pointer to the desired object. When the red frame appears around the object, press the Select object shortcut, Shift+Ctrl+A. (The shortcut can be changed in the Global Shortcuts options.)
To select an object in a mobile application, drag the target glyph to the desired object on the Mobile Screen (see Select an Object on the Mobile Screen).
-
Enter the object name manually
Enter the full name, full mapped name or alias of the desired object into the Object box and press Enter.
For web objects: If your project is configured to use XPath expressions and CSS selectors to locate web objects, the dialog will show the list of available locators (if any) for the specified web object. You can select the needed locator from the drop-down list.
Tips for selecting objects:
-
You may find the second technique more convenient than using the target icon, because you can manipulate applications before actually selecting an object. For example, you can open the tested application window containing the desired control and so on. Unlike using the target icon, with this technique, you can point to popup windows, tooltips, and other objects that are hidden in the application when being inactive.
-
To select a non-onscreen object, such as a
process
, enter the object name manually. -
Instead of selecting the object, you can copy its name from the Object Browser, Object Spy, keyword test, or script code beforehand and paste it into the Object box.
-
Despite the way you specify the object name, you can change or correct it directly in the Object box.
If the Map object names automatically option is selected, TestComplete automatically adds the specified object to the Name Mapping repository (if it is not there already). Your tests will take the object alias from the repository.
To make sure you have selected the correct object, click Highlight. TestComplete will highlight the appropriate object on the desktop screen or in the Mobile Screen window.
After you have selected the object, click Next to proceed.
See Also
Add Object Wizard
About Objects Collection
Name Mapping
Mobile Screen Window
Selecting an Object on the Mobile Screen (Android Testing)
Select an Object on the Mobile Screen (iOS Testing)
Preparing Android Applications (Legacy)
Preparing iOS Applications (Legacy)
Testing Mobile Applications