Forum Discussion

mddean's avatar
15 years ago

Issues with recording actions

I am fairly new to the TestComplete (we are using version 6) program and was wondering if anyone else was having similar issues to the ones I am encountering.  I'm having problems where I record performing a function in our application, save the script, reset the data back to the initial condition, and it does not replay the process consistently.  Sometimes it will click on buttons, and other times it will not.  I've also had it record the action twice, causing errors (i.e. I have it click the close button on a form and it records that action before and after it answers a question on the form).  Our application is a windows form application written in VB.Net.  I have adjusted the play back settings to slow it down, and that seems to help a little bit, but I'm still having issues.  I need to have the recording and playback to work with very little to no programming interaction since our end-user testers use this to create data in our new application.  Any suggestion would be greatly appreciated.



Thanks,



Matt

2 Replies

  • -Pv-'s avatar
    -Pv-
    Occasional Contributor
    I'm also a new 6 user who has also experimented with 7.  It took me weeks to refine my technique for capturing object names reliably so they continue to be found by TC after restarting the app or rebooting the machine.  Any time you can reduce the object names to the minimum necessary, it helps.  The AQA people here can help a lot more than I can, just responding to  the same desperation you have, because I've been there.  There are options in the Engines->Recording section which attempts to help with this problem.  Even with "record short names when possible" I've had to manually edit object names to things like:

    w1 = p1.Window("Afx:00400000:8:*", "*").Window("XTPDockBar", "xtpBarTop").Window("XTPToolBar", "The Ribbon");



    Note the Afx...



    If the long names you are capturing are at the end of the name, stars work well.



    Also, I will record several passes over the same control and observe the differences.  If I get a diff on each try, I attempt to manually edit the control to one which is repeatable over time.  This is a long-tedious process for me which after refining for weeks has produced objects which are seen every time now.



    For instance, the following worked for weeks then stopped:

    p1 = Aliases.Sys.SLClient1;

    w1 = p1.Window("#32770", "Starlight");

    if(w1.WaitProperty("VisibleOnScreen", true, 1000))

    ...



    This had to replaced by:

    if(Aliases.Sys.SLClient1.Window("#32770", "Starlight").Window("Button", "&No").WaitProperty("VisibleOnScreen", true, 1000))

     ...



    This is a dialog box.  Unfortunately, using both TC7 demo and Enterprise, Seven has even more trouble with our app than six.  I've not been able to capture ANY object names which will play back even once.  Note: You shouldn't have to immediately "Save" the unit in which you record the interaction.  You can immediately play back the script thus capturing many temporary events without harming an earlier save of a working portion while you experiment.

      -Pv-


  • Hello Matt and Paul,






    The difference between the approaches used in versions 6 and 7 is that the latest version uses Name Mapping automatically when you are recording a test.


    Depending on your application's specific, the recognition parameters of the tested objects may change from one application run to another, while TestComplete can't predict such changes. So, TestComplete may use the mapping criteria that are not reliable. However, Name Mapping is a good mechanism to get consistent object recognition by altering the default mapping criteria and using wildcards when needed. At that, even if some recognition parameters change, you do not have to change any of your tests - modify the Name Mapping scheme and you'll get all your scripts working again.






    Please note: when you run a test in TestComplete 7, and the script cannot find an object, TestComplete posts the mapped name of the missing object in the Remarks section of the "Object not found" error. So, you just go to your Name Mapping scheme and check the mapping parameters of the missing object against their actual values you see in the Object Browser panel. So, you can easily find out why exactly the object was not found, and map the object using some different criteria that do not change from run to run. If you need some assistance with this, send us your project suite and the results of the failed execution, and we will see what we can do to help you:


    http://www.automatedqa.com/support/message/