cancel
Showing results for 
Search instead for 
Did you mean: 

Question Around Name Mapping

SOLVED
Highlighted
Frequent Contributor

Question Around Name Mapping

Hi

 

The name of the item appearing on screen is 'Show Document' which is a MenuItem however in the Object Browser it is named as MenuItem(0). Now, after mapping the item I had changed the of MenuItem(0) to its actual on screen name which is 'Show Document' however my test failed. I have attached the screenashot of the reason from test log.

 

Is there a way I can sort this out and ensure that the on screen name is mapped to the MenuItem(0) in a way that it gets identified correctly ?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Question Around Name Mapping

Edit the mapping.  You have the Alias correct as "Show_Documents" but you don't need the "Name" property in your criteria.  Remove that property, it has no impact on the Alias.


Robert Martin
[Community Expert Group]
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
Extensions available

View solution in original post

12 REPLIES 12
Community Hero

Re: Question Around Name Mapping

The "Name" property is not "Show Document".  That is the text that appears on screen, but it is not the "Name" property of the object itself.  Technically speaking, you shouldn't be using Name to identify an object.

 

Prior to making your edits, were there errors or something happening in your test that prompted the need to change it?  Perhaps we can find a better way of solving your problem.


Robert Martin
[Community Expert Group]
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
Extensions available
Frequent Contributor

Re: Question Around Name Mapping

No there weren't any errors as such however what prompted me to take this action was, that elsewhere within our system there are multiple objects which are named as MenuItem(0) so in order for me to make identification easire I thought I'll change the name. Thanks

Community Hero

Re: Question Around Name Mapping

That's what Aliases are for. Smiley Happy  So, rename the Alias for the object to be what you want.  There's no need to change the mapping criteria.  


Robert Martin
[Community Expert Group]
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
Extensions available
Frequent Contributor

Re: Question Around Name Mapping

I guess that's what I did then. Please see the screen shot attached.

Community Hero

Re: Question Around Name Mapping

Edit the mapping.  You have the Alias correct as "Show_Documents" but you don't need the "Name" property in your criteria.  Remove that property, it has no impact on the Alias.


Robert Martin
[Community Expert Group]
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
Extensions available

View solution in original post

Frequent Contributor

Re: Question Around Name Mapping

It worked! Thanks


@tristaanogrewrote:

Edit the mapping.  You have the Alias correct as "Show_Documents" but you don't need the "Name" property in your criteria.  Remove that property, it has no impact on the Alias.


 

Frequent Contributor

Re: Question Around Name Mapping

While the previous test worked, I bumped into another issue which may or may not be related to name mapping.

 

In Object Browser, the main menuitem name is MenuItem('Action') while the submenus under it are listed as menuitem(0), menuitem(1) and so on. The OnScreen name of the main menu is 'Action' and menuitem(0) is 'Refresh' & menuitem(1) is 'Change Adviser'

 

I had renamed the Alias menuitem(1) to Change_Adviser however, now, when I run my test I would expect a Click on main menu Action followed by sub menu Change Adviser but while executing the test I get a pop up message from TC "Unable to find the object that matches the "Change_Adviser" item, and then it gives me 2 options ie: Point to 'Change_Adviser' on screen & Edit the identification properties of 'Change_Adviser'. If I select first option of pointing on screen, the test fails with following reason ..... There was attempt to perform a action on a zero sized wondow........"The window size is (0, 0); the screen rectangle: the left top corner is (0, 0), the right bottom corner is (0, 0). Tested object: A. Editing the property too has no success.

 

I am not sure what's wrong here, would you be able to suggest anything ? Screenshot attached for more details. Thanks

Community Hero

Re: Question Around Name Mapping

IF the secondary menu does not appear until you click on the first, you can't easily just point at the menu or find it on screen.  Instead of the drag-the-target method for finding objects in these situations, there's an option for SHIFT-CTRL-A... you select that, take your mouse to where you want it, click what you need, and then enter that keystroke to capture the highlighted object.


Robert Martin
[Community Expert Group]
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
Extensions available
Frequent Contributor

Re: Question Around Name Mapping

I would prefer that option but when I use CTRL+Shift+A, I get a different aliases altogether and when I right click on that alias and select option 'Show in Object Browser' it gives me an error message that "unable to highlight alias object in object browser panel, as it does not exist". Therefore, I am trying to use the object which exist in object browser rather than going CTRL+Shift+A route.

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors