Forum Discussion

wangfei0079's avatar
14 years ago

How can I avoid crash when I record test case over WPF controls?

Anyone get the issue of crash on WPF controls workflow as recording test case by using TestComplete? From my code, I debug into the crash point. It seems a WPF "Clear" operation of Collection class. If I only run my application, it works fine. But if I start app and spoon the app by TestComplete. It will be crash at the colloection clear line. The exception message is "Cannot explicitly modify Children collection of Panel used as ItemsPanel for ItemsControl. ItemsControl generates child elements for Panel."



Any suggestions and comments are appricated!

1 Reply


  • Hi Fei,





    Please follow the steps below to help us investigate the problem:





    1. Download a free trial version of AQtime 7, which is our profiling tool, from our web site. The trial can be requested on the following page of our web site:

    http://www.automatedqa.com/downloads/aqtime/





    2. Install the tool.





    3. Start AQtime with the -NotOpenApp command line argument. For example, you can use the following command line:

    "c:\Program Files\Automated QA\AQtime 7\Bin\AQtime.exe" -NotOpenApp





    4. Select the 'File | New Project From Module...' main menu item.





    5. In the Open File dialog, select the the tested application's executable file and click Open.





    6. Take a look at the AQtime toolbar - there is a combo box. Open it and select the "Tracing | Exception Trace Profiler" item.





    7. Select the "Options | Options..." main menu command - the Options dialog will appear.





    8. Set the "Profiling Time | Event View | General | Exceptions | Depth shown" setting to 100 and click OK.





    9. Start the tested application.





    10. Click the Run | Attach to Process... main menu item in AQtime.





    11. Select the tested application's process from the list by double-clicking it and click Run in the dialog that appears after that.





    12. Reproduce the problem.





    13. After the problem occurs, right-click somewhere within the Event View panel (it is opened by default at the bottom of AQtime's window) and select the 'Save All...' item.





    14. Save the panel's contents to an HTML file and send me the file via our Contact Support form:

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





    Thanks in advance.