Forum Discussion

bdrummond's avatar
bdrummond
Contributor
6 years ago
Solved

How do I manually map an invisible object such as 'Docking Hint'...?

Hi all,

 

After a length of good run of using Test Complete version 14.20, I have come across another obstacle for my testing procedure.

 

How do I manually map an invisible object such as 'Docking Hint' when it's only visible on a click & drag event on a toolbox (floating) object...?


I can use the TC's Object Spy to recognise and find the WinFormsObject called "DockingHint". see the 1st image. but upon my attempt to manually map it in the project's NameMapping, it won't be listed in the list see the 2nd image

 

My Steps/workflow: I have a Toolbox which is a 'DevComponents.DotNetbar'. This Toolbox can be set to be floating as well as dockable left and right. The workflow is start with a docked toolbox and then I will click (then hold) & drag this toolbox into an object WinFormsObject("DockingHint") for left hand side dock. The toolbox then now will be docked on the left side.

 

I have tried to record test, but it only created event based on relative position of the screen.

 

Thanks in advance for your help.

 

BD

 

 

  • bdrummond's avatar
    bdrummond
    6 years ago

    Great stuff,

     

    Although I have the object namemapped, I come across (with luck) a method which I no longer need that 'DockingHint' object anymore.

     

    Instead, I have a property of the Toolbox called 'Dock [Set]' and set it's value to either "left" or "right". This method allow me to command my application to redock that toolbox accordingly : )

     

    Thanks again for your help.

     

    BD

5 Replies

    • bdrummond's avatar
      bdrummond
      Contributor

      Hi tristaanogre,

       

      Thank you for your reply and superbly simple answer. I am amazed how I missed that method of namemapping completely. The object in question is now able to be added to the namemapping list. see the first image.

       

      But, I was wondering if you could give me some insight to what the warning message mean when I try to save the object mapping. see the second image.

       

      Thanks very much.

       

      BD

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Yes.

         

        "Name" should not be used as a property for mapping.  Basically, by using the "Name" property, you're bypassing the NameMapping engine so there's risk that identification might not be as clean.  The warning is basically saying that there is such a risk.  

         

        I would choose a property other than "Name".  Perhaps simply replace it with the ObjectType property.

  • Hi all,

     

    After a length of good run of using Test Complete version 14.20, I have come across another obstacle for my testing procedure.

     

    How do I manually map an invisible object such as 'Docking Hint' when it's only visible on a click & drag event on a toolbox (floating) object...?


    I can use the TC's Object Spy to recognise and find the WinFormsObject called "DockingHint". see the 1st image. but upon my attempt to manually map it in the project's NameMapping, it won't be listed in the list see the 2nd image

     

    My Steps/workflow: I have a Toolbox which is a 'DevComponents.DotNetbar'. This Toolbox can be set to be floating as well as dockable left and right. The workflow is start with a docked toolbox and then I will click (then hold) & drag this toolbox into an object WinFormsObject("DockingHint") for left hand side dock. The toolbox then now will be docked on the left side.

     

    I have tried to record test, but it only created event based on relative position of the screen.

     

    Thanks in advance for your help.

     

    BD