Forum Discussion
So, what's wrong with your name mapping that it's not finding the objects properly? Seems that the problem is not necessarily with the checkpoint but with your name mapping.
I don't know of any way to turn off that override. Doing so, however, seems like it would be masking the problem. You have an item mapped, so it's trying to use the mapped information. If the mapping isn't working, then the better solution would be to fix what's wrong with the mapping.
When I first started using TestComplete (version 11) last year, I came across an issue where my tests would fail. I would manually create a Property/Object Checkpoint using the 'Drag target to object' and then I would select all the properties I wanted to include in the validation. When running the test would fail, I Looked at the error messages and noticed that stored values were right but the actual values were completely off. When I went back to the test editor, I opened the checkpoint and selected the highlight button, I found that TestComplete was pointing to the wrong object.
Take a look at the information Object Spy provides when looking at three different button on the same web page :
FULL NAME ===
BUTTON 1 : Sys.Browser("iexplore").Page("https://xxx").Table(0).Cell(1, 1).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Panel(0)
BUTTON 2 : Sys.Browser("iexplore").Page("https://xxx").Table(0).Cell(1, 1).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 1).Panel(0)
BUTTON 3 : Sys.Browser("iexplore").Page("https://xxx").Table(0).Cell(1, 1).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 0).Table(0).Cell(0, 2).Panel(0)
MAPPED NAME ===
BUTTON 1 : Aliases.browser.pagexxx.tableGemsContainerPanelPieHover.cell3.tablexxxRightPanel.cell.tableNeditorBasicPieFirstChildPi.cell2.tableToolbarBorder.panelAutoPopulateValues
BUTTON 2 : Aliases.browser.pageGems.tablexxxContainerPanelPieHover.cell3.tablexxxRightPanel.cell.tableNeditorBasicPieFirstChildPi.cell2.tableToolbarBorder.panelAutoPopulateValues
BUTTON 3 : Aliases.browser.pagexxx.tablexxxContainerPanelPieHover.cell3.tablexxxRightPanel.cell.tableNeditorBasicPieFirstChildPi.cell2.tableToolbarBorder.panelAutoPopulateValues
As you can see, there is a difference between the FULL NAME of the three buttons ( highlighted in RED ) but for the MAPPED NAME there is not different and when the test is run, all three buttons end up pointing to that third button.
Because of this, and lack of expertise, I found that using the FULL NAME would resolve this. But now with version 12, when I finish the checkpoint it reverts to using the MAPPED NAME.
You mentioned that this name mapping issue can be fixed?
- tristaanogre8 years agoEsteemed Contributor
So... they all have the same Alias... that means that whoever did the mapping didn't do it correctly. In the Mapping portion of the panel, that full name should be represented somehow in order to give each item a distinctive identification. somewhere in the mapping, those cells that are different should be there... if they are not, that's where your problem is. Correct that mapping, and you're golden.
- tristaanogre8 years agoEsteemed Contributor
Just as a side note.... if your Alias 100% reflects the full name path of your object, you're doing it wrong. The purpose of aliases is to allow you to map an object with as much detail and hierarchy as necessary but be able to "telescope" unnecessary layers to be able to access your object.
So, for your three buttons, your NameMapping would potentially look like this:
NameMapping.sys.browser.pagexxx.Table0.Cell11.Table0.Cell00.Table0.Cell00.Table0.Cell00.Table0.Cell00.Panel0
NameMapping.sys.browser.pagexxx.Table0.Cell11.Table0.Cell00.Table0.Cell00.Table0.Cell00.Table0.Cell01.Panel0
NameMapping.sys.browser.pagexxx.Table0.Cell11.Table0.Cell00.Table0.Cell00.Table0.Cell00.Table0.Cell02.Panel0
But then you'd delete unnecessary intermediate layers in your aliases...oh, and rename objects to something meaninful. So, they could, potentially, look like this:
Aliases.browser.pagexxx.tableGemsContainerPanelPie
Hover.tableToolbarBorder.Button1 Aliases.browser.pagexxx.tableGemsContainerPanelPie
Hover.tableToolbarBorder.Button2 Aliases.browser.pagexxx.tableGemsContainerPanelPie
Hover.tableToolbarBorder.Button3 Note, you don't HAVE to include all the layers in your aliases... Button1 maps to the first row above... the unique hierarchy is preserved in the mapping but, so you can use it easier, the full hierarchy isn't needed in the Aliases.
If you follow this (and it is actually easier than it sounds), your mapping will work, your buttons will be properly identified, and that checkpoint over-riding thing will no longer be an issue.
Related Content
Recent Discussions
- 3 days agoMW_Didata