In the Map Object dialog, you select the object you want to add to the Name Mapping repository. The dialog appears when you do any of the following:
-
Click Map Object From Screen on the Tools toolbar.
-
Click Add Object on the Name Mapping repository toolbar.
-
Click Map New Object on the first page of the wizard that appears when you add a keyword test operation that works with objects and controls to your keyword test.
You can specify the object to map in one of the following ways:
Note for mobile testing: 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 for TestComplete to be able to access the application’s objects.
-
Pick the object with the target glyph
Drag the glyph to the desired onscreen object and drop it once 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, activate the desired object in the application and position the mouse pointer over it. 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, move the mouse pointer over the desired object on the Mobile Screen (see Select an Object on the Mobile Screen).
Tip: |
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 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.
To map the selected object, click OK. To close the dialog without creating a name mapping item, press Cancel.
Upon closing the dialog with the OK button, TestComplete will do the following:
-
If the project does not have the Name Mapping project item, TestComplete will prompt you to add it.
-
If the object’s parent objects are not in the Name Mapping repository yet, TestComplete shows a list of unmapped parent objects and prompts you to map them.
-
TestComplete will open the Object Name Mapping dialog where you can select identification properties for each object added to the Name Mapping repository.