Forum Discussion

lhuang5's avatar
lhuang5
Occasional Contributor
12 years ago

Why is the mapping name changed using UI automation running?

Hi, 



I met a strange problem on my Test Complete project. The mapping name of main window could change occasionally from 

Sys.Process(processName).WinFormsObject("ClrMainFrame", WndCaption) to 

Sys.Process(processName).Window("WindowsForms10.Window.8.app.0.38248fc_r37_ad1",WndCaption, 1) after some operations using TestComplete script.



What is the possible reason for such changes? Is it possible to fix them?



Thanks

Best regards,

Liping Huang





3 Replies

  • lhuang5's avatar
    lhuang5
    Occasional Contributor
    Hi, I just got the answer from my colleague. It's possibly because our software is not reponding quickly enough to TestComplete's calls. 



    It can avoid most of such problems by setting the Method invoke timeout to be a VERY high value in Project Properties->Applications.



    However, it could happen when we try to open and close this software many times. Do you have any other idea to avoid such problems.



    Thanks

    Best regards,

    Liping Huang
  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    I've seen things like this happen when we've been working in TestComplete for several hours in a row.  TC will also stop recognizing the application under test for seemingly no reason at all, but maybe it is related to this.  



    We usually have to restart both TC and the application under test to get it to reset properly.  



  • lhuang5's avatar
    lhuang5
    Occasional Contributor
    Yes, to restart TC and the application could solve this problem. However this will break the automation test. 



    So are there any rules to avoid such problem during writing the tests?