Forum Discussion

Azeddin_Margani's avatar
Azeddin_Margani
Contributor
8 years ago

Dropdown box mapped name that has got dynamic id

Hi,

 

Could someone please help - I have a dropdown field that its ID keeps changing. I did use the wild card *? but not seems to be working.

 

The mapped name is:

Aliases.ERG_ITSO_Gui_Ccc.MainFrm.MdiClient.ConfigurableProductSalesDlg.m_ProductParametersGroupBox.m_DynamicControlContainer.DcLocation2.m_CboWidget

 

The digit "2" highlighted in red keeps changing ?.

 

My attempted code:

Aliases.ERG_ITSO_Gui_Ccc.MainFrm.MdiClient.ConfigurableProductSalesDlg.m_ProductParametersGroupBox.m_DynamicControlContainer.DcLocation*?.m_CboWidget

 

Any better idea of using wildcard in this case? 

 

Thanks in advanced.

 

 

 

3 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    If you are changing the Aliases name then it won't work. Its just a name.

     

    For Example,

     

    ObjectName is changing dynamically like Combo_Box1 and Combo_Box2 then try like below screenshot.

     

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    If the field is always the same field in the application, the problem is not in the alias you have but in the mapping properties that you are mapping that component.  Basically, each time through the application, something is changing so that TestComplete needs to remap that component as a "new" one.

    So... go take a look at the criteria that is being used to map that component, look for dynamic stuff there, possibly add some additional properties or refine the existing properties so that you will get a consistent mapping each time.