Ask a Question

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

SOLVED
bdrummond
Contributor

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

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
tristaanogre
Community Hero

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

Have you looked into using "point and fix" mode?  For objects, etc., that don't appear unless hovered, etc., this is the best way I've found.  From your screenshot, I see you used this mode for doing the object spy.  The same mode is available when mapping objects.

https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/selecting-objects-using-...

 

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

bdrummond
Contributor

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

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

View solution in original post

5 REPLIES 5
bdrummond
Contributor

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

 

 

tristaanogre
Community Hero

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

Have you looked into using "point and fix" mode?  For objects, etc., that don't appear unless hovered, etc., this is the best way I've found.  From your screenshot, I see you used this mode for doing the object spy.  The same mode is available when mapping objects.

https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/selecting-objects-using-...

 

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
bdrummond
Contributor

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

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
Community Hero

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

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
bdrummond
Contributor

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

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

cancel
Showing results for 
Search instead for 
Did you mean: