How do I manually map an invisible object such as 'Docking Hint'...?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
