nmoro
14 years agoOccasional Contributor
How to access Grids with object mapping
I am working with an application that uses Janus Grids. I am using the object method to manipulate controls (instead of using x & y co-ordinates that can constantly change) and I'm finding that if I click into each cell, my tests work fine but if I don't initially click into each grid it can't detect any of my NameMapping. I've tried to use the RefreshMappingInfo() with no luck. I have gone into each individual name that is mapped and enabled "Find this node on any level of NameMapping Tree". I have the page that it's looking for on my screen and it still can't find these already mapped objects. Help please? I've tried .SetFocus, .Keys, .Focus, .Click, .OnClick, etc.
Here is a snippit of what I'm working with (as you can see I've even tried introducing wild card characters into the code):
function Contact_Activity_Note()
{
Aliases.ApplicationName.frmACActivity.WinFormsObject("*").TopLevelControl.MainRibbonTab.Ribbon.TopLevelControl.m_NotesPanel.DockPanel(); //this code goes to the appropriate panel and sets focus
Aliases.ApplicationName.frmACActivity.z2d223ac_0224_425c_a9b5_8640f2d13173.z9e9cf71_0eda_4724_a41e_8454693411b5.z9e9cf71_0eda_4724_a41e_8454693411b5Container.aslUCNotesGrid.grpGrid.grdData.Click();
//this section is attempting to click the grid to give it focus
Aliases.ApplicationName.frmACActivity.z2d223ac_0224_425c_a9b5_8640f2d13173.z9e9cf71_0eda_4724_a41e_8454693411b5.z9e9cf71_0eda_4724_a41e_8454693411b5Container.aslUCNotesGrid.grpGrid.grdData.JNSDX.aslUCEdit.edtTextbox.TextBox.Keys("test"); //this code section is attempting to type into the grid that it can't see
}
Here is a snippit of what I'm working with (as you can see I've even tried introducing wild card characters into the code):
function Contact_Activity_Note()
{
Aliases.ApplicationName.frmACActivity.WinFormsObject("*").TopLevelControl.MainRibbonTab.Ribbon.TopLevelControl.m_NotesPanel.DockPanel(); //this code goes to the appropriate panel and sets focus
Aliases.ApplicationName.frmACActivity.z2d223ac_0224_425c_a9b5_8640f2d13173.z9e9cf71_0eda_4724_a41e_8454693411b5.z9e9cf71_0eda_4724_a41e_8454693411b5Container.aslUCNotesGrid.grpGrid.grdData.Click();
//this section is attempting to click the grid to give it focus
Aliases.ApplicationName.frmACActivity.z2d223ac_0224_425c_a9b5_8640f2d13173.z9e9cf71_0eda_4724_a41e_8454693411b5.z9e9cf71_0eda_4724_a41e_8454693411b5Container.aslUCNotesGrid.grpGrid.grdData.JNSDX.aslUCEdit.edtTextbox.TextBox.Keys("test"); //this code section is attempting to type into the grid that it can't see
}