On this page of the Add Image wizard, you can select the object or its area whose image you want to capture.
Note for mobile testing: To capture an image of the object or object’s area 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.
You can specify the image to capture in one of the following ways:
-
Drag the target to point to the object
-
Drag the target glyph () to the desired 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).
-
Wait until the red frame appears around the object and release the mouse button.
TestComplete will display the name of the selected object in the Object box.
-
-
Point and press a shortcut
-
Click the button, and then move the mouse pointer to the desired object.
To select an object in a mobile application, move the mouse pointer over the desired object on the Mobile Screen (see Select an Object on the Mobile Screen).
-
Wait until the red frame appears around that object and press Shift+Ctrl+A (this shortcut can be changed in the Global Shortcuts options).
TestComplete will display the object name in the Object box.
-
-
Select arbitrary object area
Click the button and use the crosshair pointer to draw a rectangle indicating the object area that you want to capture. If you want to capture an area in a mobile application, use the pointer to draw the desired area in the Mobile Screen.
TestComplete will display the name of the object to which this area belongs in the Object box.
The selected region must belong to a single object. You cannot select an area that includes multiple objects or object parts. -
Enter the object name manually
Enter the full name, full mapped name or alias of the object to capture 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:
-
Using the second approach may be more convenient if you need to manipulate the application before selecting an object. For example, you can open and point to popup windows, tooltips, and other objects that are hidden when being inactive.
-
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.
The captured image is displayed in the Preview area. To highlight the appropriate object on the screen, click Highlight.
Click Finish to exit the wizard and save the created image to the project’s Stores > Regions collection. The image name is automatically generated by TestComplete based on the object name. The image format is specified by the Images property of your test project.
See Also
Add Image Wizard
About Regions Collection
Name Mapping
Testing Mobile Applications
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)