Dynamic Objects with the Same Name
Hi! I am new to Test Complete and have been using the trial
version for a couple of days now. If I can successfully test some of the
modules in our application we plan on purchasing the product.
I am having a problem and moment with ambiguous Objects.
I am using a screen that has dynamically creates combo boxes
when on field is select. See the story line below for details.
App Type: Silverlight 4
1. I click on a Sort Button which brings up the sort dialog
2. When the Sort Dialog loads here is what the screen and
object browser look like. Note the Arrows.
[See image1.jpg]
3. In the _comboBoxProperty I select Combo Box Item 3, aka
Associated SRCs
[See image2.jpg]
4. Once Selected the _comboboxSortType (previously
invisible) now becomes visible. At the exact same time, a new _comboBoxProperty
and _comboboxSortType are generated below it with the SAME NAME:
[See image3.jpg]
5. So whenever I try to change the originals _comboboxSortType
I get the Ambiguous recognition of the
tested object.
[See image4.jpg]
-------
Error Messages
[see image5.jpg]
WARNING
There are several objects in the system that match the recognition attributes
of the "zcomboBoxSortType"
mapped object.
This may cause the "Object not found" error.
Objects
Sys.Process("IEXPLORE").Page("http://192.168.20.103:55/Admin/#Branches").Form("aspnetForm").Panel(1).Object("silverlightContainerObject").SlObject("Popup",
"").SlObject("SortDialog",
"").SlObject("_scrollViewerItems").SlObject("_comboBoxSortType")
Sys.Process("IEXPLORE").Page("http://192.168.20.103:55/Admin/#Branches").Form("aspnetForm").Panel(1).Object("silverlightContainerObject").SlObject("Popup",
"").SlObject("SortDialog",
"").SlObject("_scrollViewerItems").SlObject("_comboBoxSortType")
To solve the problem, you may need to modify mapping
settings for the "zcomboBoxSortType"
object or one of its parent objects.
ERROR
An error occurred while calling the "Click" method or property of the "ComboBoxItem"
object.
The object or one of its parent objects does not exist.
Tested Object
| Alias: | Aliases.IEXPLORE.pageAstAdministration1.formAspnetform.panel.objectSilverlightcontainerobject.Popup.SortDialog.zscrollViewerItems.zcomboBoxSortType.Popup.ComboBoxItem |
| Mapping item: | NameMapping.Sys.IEXPLORE.pageAstAdministration1.formAspnetform.panel.objectSilverlightcontainerobject.Popup.SortDialog.zscrollViewerItems.zcomboBoxSortType.Popup.ComboBoxItem |
Missing Object
| Alias: | Aliases.IEXPLORE.pageAstAdministration1.formAspnetform.panel.objectSilverlightcontainerobject.Popup.SortDialog.zscrollViewerItems.zcomboBoxSortType.Popup |
| Mapping item: | NameMapping.Sys.IEXPLORE.pageAstAdministration1.formAspnetform.panel.objectSilverlightcontainerobject.Popup.SortDialog.zscrollViewerItems.zcomboBoxSortType.Popup |
Here is the JavaScript behind these actions
function Test1()
{
var iexplore;
var scrollViewer;
var comboBox;
iexplore = Aliases.IEXPLORE;
scrollViewer =
iexplore.pageAstAdministration1.formAspnetform.panel.objectSilverlightcontainerobject.Popup.SortDialog.zscrollViewerItems;
//_comboBoxProperty Selection
comboBox = scrollViewer.zcomboBoxProperty;
comboBox.DropDown();
comboBox.Popup.ComboBoxItem.Click(67, 4);
//_comboboxSortType Selection
comboBox = scrollViewer.zcomboBoxSortType;
comboBox.DropDown();
comboBox.Popup.ComboBoxItem.Click(53, 8);
}
--
Can someone please help out?
I figure it has something to do with Object Mapping, but am not having any luck