Ask a Question

Stopping creation of Aliases by default

SOLVED
jr348
Contributor

Stopping creation of Aliases by default

Is there any way of stopping TC creating of Aliases by default when new elements are mapped.

 

TC produces a lot of elements we dont need, and we'd like to maintain the Alias map by adding as required into a fairly simplified UI Alias map.

5 REPLIES 5
tristaanogre
Esteemed Contributor

No.  Because Aliases are the preferred way of referencing an object, every time an object is mapped, an Alias is created.  So, if you want to modify Aliases after mapping, that's a "step 2" in your mapping process.


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

Thanks Robert. 

 

I'd say that's a good idea for desktop apps but for java/REACT web pages with vast numbers of nested DIV containers which all gets mapped it prodces a lot of clutter we dont' need.

 

I'd like to maintain a high level alias structure like this:

Browser

>>Page

>>>>Content Container

>>>>>>Menu Container

>>>>>>>>Option 1

>>>>>>>>Option 2

>>>>Toolbar Container

>>>>Modal popups etc

 

Mapping a single button can produces 15-20 parent objects  which is fine in Name Mapping  but messes up Aliases. 

 

I'lll have a go at the approach you mentioned and let you know.

 

Thanks

tristaanogre
Esteemed Contributor

That's the best approach, really.  In my experience, while generally you don't need alot of those DIVs mapped, occasionally I've needed it to do some other detection or verification.   

 

Modifying the Alias after the fact is relatively easy.  Highlight the objects in the Alias tree, right click, and select "Exclude Items".  This preserves the mapping for the identification engine but "telescopes" your Alias tree to something more manageable.

 

ExcludeItems.png


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

I've seen that option but was to "afraid" to use it in case it broke too many tests.

 

We have a lot of legacy mapping in our our name map which needs removing as it's causing to many recogition issues and causing new mapped elements to be placed into the wrong part of the tree. 

 

I've created a copy of our project with a deleted name map and will re-create it with the lessons learnt from our previous project and use the method you mentioned above to keep it trimmed down.

 

Thanks for your help with thiis.  Much appreciated.

AlexKaras
Champion Level 3

Hi,

 

Just to ensure that you are aware about Tools|Options|Engines|NameMapping|Map Object Names Automatically and Update Name Mapping During Test Run options.

I prefer to have them not checked and manually map only those elements that I need and control what properties are used for their identification.

Then I organize Aliases tree in a way that is convenient to me. (Robert's note about DIVs is perfectly valid.)

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: