Forum Discussion

jim_davidson's avatar
jim_davidson
Occasional Contributor
11 years ago

Trouble with check pointing a region


I am having a issue with Region checkpoints and its because some of the underlying names of the application controls change each time the application is launched.

For example, I have this checkpoint defined:



 Call Regions.InternetExplorerServer4.Check(Regions.CreateRegionInfo(Aliases.posw.wndATL00ED6DA0.Static.ShellEmbedding.ShellDocObjectView.InternetExplorerServer, 12, 98, 763, 272, False))



This works for as long as I keep the application running. Once I have exited and restarted the application, the control name changes. If I use the spy tool and go over the same region as was captured above, it looks like this.



Aliases.posw.wndATL10116DA0.Static.ShellEmbedding.ShellDocObjectView.InternetExplorerServer



The "wndATL00ED6DA0" changed to wndATL10116DA0.And when I stop/restart the application again this value will be something else.



Any suggestions on how I can deal with this scenario (keeping in mind that application in question cannot be changed).


Thanks.

Jim



2 Replies

  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor
    Hi Jim



    You can use the asterisk (*) wildcard in place of the dynamic text in your name mapping. This should solve your issue.



    Regards

    Stephen.
  • jim_davidson's avatar
    jim_davidson
    Occasional Contributor
    I changed the line to read:

     Call Regions.InternetExplorerServer4.Check(Regions.CreateRegionInfo(Aliases.posw.*.Static.ShellEmbedding.ShellDocObjectView.InternetExplorerServer, 12, 98, 763, 272, False))



    but this syntax is not being accepted. Tried various combinations with no luck. What is it that I am missing here?



    Thanks,