Forum Discussion

madamakis's avatar
madamakis
Occasional Contributor
12 years ago
Solved

How to add "NativeClrObject.Name"

Hello,



I'm very new to Testcomplete and having a really hard time to add this object into name mapping.

Since there was a new software release an object was entered and I'm having a hard time to add it to contuine.  I really don't want to re-create the whole keyword test.



This was the old code:



HwndSource_Shell.Shell.Grid.ContentControl.MainViewControl.Grid.MainTabControl.TabItemView.Grid.DockPanel.Grid.Grid.MainView.CompanyFinancialStatementsView.

Grid.MainTabControl.IncomeStatementMain.Grid.FinancialItemsGrid.DataGridRow2.DataGridCell.ContentPresenter.ProbeFinancialNumberTextbox



This is the new one:



Probe50.HwndSource_Shell.Shell.Grid.ContentControl.MainViewControl.Grid.MainTabControl.TabItemView.Grid.DockPanel.Grid.Grid.MainView.CompanyFinancialStatementsView.

Grid.MainTabControl.IncomeStatementMain.----FinancialScrollViewer------.Grid.FinancialItemsGrid.DataGridRow.DataGridCell.ContentPresenter.ProbeFinancialNumberTextbox



As you can tell "FinancialScrollViewer" has been added but how in the world can I add this to Name Mapping to ccontuine my testing.



It's happening often.



Many thanks.
  • Not quite sure if this iswhat you mean but...



    You could use the map object from screen dialog to map the FinancialScrollViewer.

    Then in the name mapping file drag all the children of 
    IncomeStatementMain onto the 

    FinancialScrollViewer. This may force test complete to produce the dialog..."want to update tests". 



    If not you will have to remap the affected actions  --> double click on them in the keyword test and map object from screen.



    There may be a better way but i've used the above in the past. 

4 Replies

  • Not quite sure if this iswhat you mean but...



    You could use the map object from screen dialog to map the FinancialScrollViewer.

    Then in the name mapping file drag all the children of 
    IncomeStatementMain onto the 

    FinancialScrollViewer. This may force test complete to produce the dialog..."want to update tests". 



    If not you will have to remap the affected actions  --> double click on them in the keyword test and map object from screen.



    There may be a better way but i've used the above in the past. 
    • finae's avatar
      finae
      Contributor

      Use Dynamic Name Mapping, that way when you do need to change something it would not be as big an issue.

  • madamakis's avatar
    madamakis
    Occasional Contributor
    Thanks.



    Remapping every single field will take whole day.  The point of automation is to prevent this.  I've spend almost two full days trying to figure this out.  Mauanl would have been finished long time ago.



    Support isn't that helpfull either havn't even received a reply it's been way over 72 hrs wait period and this is simple.



    I have three words the I can think of for this software.



    Thanks again Kim