Forum Discussion

bernhardz's avatar
bernhardz
New Contributor
14 years ago

Windows recognition under Win7 and Aero interface

My open Delphi application test suite runs correctly under XP using Delphi Script inTC 7 and such code as



    p1.Window('TMessageForm', 'Special Credit Tracking').Window('TButton', 'OK').ClickButton;



However, under Win7 with the Areo UI or even the Basis Win7 UI the code has to be: 



    Aliases.ORE.dlgSpecialCreditTracking.DirectUIHWND.CtrlNotifySink.btnOK.ClickButton



From the way I read this, it makes using many of the TC command unworkable such as WaitWindow because of the parameters required. When switching to a basic XP style interface, the old Window addressesing surfaces again.



Is there a fix for this? My Delphi application is including some old TC source units first obtained under TC4 to compile into an open application. Is there an update available for those?



TIA



Bernhard

3 Replies


  • Hi Bernhard,





    It looks like the first code was recorded in an old version of TestComplete, which does not have the automatic Name Mapping feature while the second code variant is recorded with TestComplete 7, where the feature is enabled by default. You can find information on this in the Name Mapping - Overview help topic.





    In case of using the Name Mapping feature, you can use the WaitAliasChild and WaitNamedChild methods.





    My Delphi application is including some old TC source units first obtained under TC4 to compile into an open application. Is there an update available for those?
    TestComplete 7 does not require adding any special TestComplete units to a VCL application project to make it Open. The only requirement is to compile the application with debug information to make the Debug Agent able to access public, private and protected members of the application's objects.
  • bernhardz's avatar
    bernhardz
    New Contributor
    Thanks for the quick reply.



    You are correct, the original script was recorded in TC4.



    However, this doesn't address the changes in the Window recognition when switching UI's. Re-recording the script action in TC7 with a basic XP style UI configuration in Windows 7 records the same style Windows code as was originally done in TC4. Only when switching to the Win7 UI model does the code switch to the new ControlSink.... style.



    While running in the XP Style UI, my project is completely compatible between XP and Win7.



    I will try working with the Aliases model, but I am not very confident that I can make everything work. I can see the benefits of the alias approach, but only as a way to shorten the control addresses, not as a means to circumvent the problem I am having.





    Bernhard 

  • Hi Bernhard,





    I'm still not sure exactly what does not work for you. Please reproduce the problem, pack the entire project suite folder, and send me the archive via the Contact Support form. I will look into this.