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.
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.
-
Instead of selecting the object, you can copy its name from the Object Browser, 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
About Name Mapping
Testing Mobile Applications
Selecting an Object on the Mobile Screen (Android Testing)
Select an Object on the Mobile Screen (iOS Testing)
Instrumenting Android Applications - Overview
Preparing iOS Applications