Name Mapping in the Web module
Hi,
I have installed a web-module, previously I was working only with desktop.
I am testing a web application. Application starts from the dashboard, which contains a main menu in the header.
Header contains a number of elements, which are common for each page. As example it's a link "Logout".
This element was mapped as: Aliases.dashboard.header.linkLogout
But if I want to use this element from another place of application, say from the some Menu_1 or Menu_2, I can't do it, because TC recognize each page of menu as a new parent page. So I should map "Logout" link for each page to use it there, like:
Aliases.menu_1.header.linkLogout or Aliases.menu_2.header.linkLogout etc.
I am looking for the way to avoid creating of redundant aliases for the same elements.
Please give me the direction how to do it.
Many thanks!
P.S. As a workaround I use the FindObject method by XPath, but it does not store the element in the name mapping repository.
If I understand your problem correctly, what you need is to do is to have a general parent. So besides mapping page_1, page_2 etc., you have a mapping that covers any page and put the children that exist on all your pages under that. When you try to do that, you will see that it tells you "I cannot map this object, because it is already mapped", but you just go in manually and edit this mapping so that it "breaks", do your general mapping, and fix the other mapping manually again. Then you just have to make sure that the children you want under the specific parents end up under them and the ones that should go under the general end up under that.
Hope this solves your problem.