Forum Discussion

gentlesea's avatar
gentlesea
Frequent Contributor
13 years ago

When choosing an object with the Object Spy the MappedName shall be copied



It happens often that I use the Object Spy to find out the MappedName. What I do here is dragging the Spy onto the object.


Then the Object Spy window is activated and I have to search for the MappedName and copy it using Ctrl-C. This is pasted immediately into the script afterwards. It would be nice if this step could be done automatically.


Also nice would be to be able to close the Object Spy using ESC.

3 Replies

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Ernst,


    It would be nice if this step could be done automatically.


    As far as I understand, you want TestComplete to paste the copied name to the script automatically without pressing the Ctrl + V shortcut, right? I think, this functionality is not very useful, as you may need to paste this name to the end of the test or to its beginning. TestComplete will need to find this place somehow. I think, it's not really helpful this way. However, using the current behavior you can easily copy the name, switch to the script, place the cursor in the needed place and press Ctrl + V to paste the name automatically.


    Also nice would be to be able to close the Object Spy using ESC.


    The fact is that the ESC button may be a reserved shortcut in other applications running on your computer. That's why, the Object Spy window uses the standard shortcut (ALT + F4) that is used for closing windows. This behavior is caused by the safety tips.

  • gentlesea's avatar
    gentlesea
    Frequent Contributor
    "As far as I understand, you want TestComplete to paste the copied name to the script automatically without pressing the Ctrl + V shortcut, right?"



    Actually I want to have the MappedName copied into clipboard. This way I could find the place to paste it by myself. Choosing an object with the Object Spy either means the object is mapped afterwards (in this case the automatically copied MappedName would be empty, the clipboard would be cleared) or the object is already mapped.



    The second case would then copy the MappedName automatically into the clipboard so I would not have to search for the row "MappedName" anymore, select its contents and press Ctrl-C and then ALT-F4 to have the name of the object. What do you think?
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Ernst,


    I've consulted our developers, and they say that this functionality is not really helpful. The fact is that you use the Object Spy window to copy MappedName, but another user may use it to obtain another property. So, TestComplete must "guess" which property it has to copy to the clipboard automatically.


    As for the boring search for the mapped name, I recommend that you use the built-in search (it's enough to enter the "mapped" string, and it will find the needed property) or switch to the Basic view mode so that the window contains less properties, and you find the needed one faster.


    Then, you just need to press two shortcuts (Ctrl + C and then ALT + F4) and everything will be done.