Forum Discussion

Haiyangwhu's avatar
Haiyangwhu
Contributor
11 years ago

Name mapping issue: Can't find the mapped control during test run

Hi, i've met an isse recently. A control is mapped with two properties: WndCaption & ObjectType. But the control cann't be found during test run sometimes.



I've checked the mapping when it failed, there was no propery "ObjectType" in Object Spy window, thus the control could not be found. But after i restarted the user application, "ObjectType" was shown again.



I don't kown why that happens, have you ever met such issue? 



TC: 9.10.1894.7

3 Replies

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi,

    Even I had faced a similar problem with name-mapping file.



    The issue here is , The namemapping file does not get refreshed on time (i.e at the time of object identification).



    You can use RefreshMappingInfo function to refresh namemapping file( & use delay to delay the script execution a bit for more safe execution of the script)



    I hope this has been of some help.



  • mark_addinall's avatar
    mark_addinall
    Occasional Contributor
    Im not sure why that would happen, but why not just use the WndCaption property for the mapping. It appears to be consistent.
  • The ObjectType property was automatically used when i mapped a control. 

    I think the reason why ObjectType does show at first in my case might be the user application and Test Complete are not run as same account.