Forum Discussion

jlui's avatar
jlui
Occasional Contributor
15 years ago

"the window was destroyed during method execution" on open dialog box

Hi, I have a open file dialog box like the one in the attachment.  I am recording an action to call up that dialog box, type in a file name and click on ok.  However, when I replay the recording, the ok button is never pressed.  Furthermore, the "files of type" drop down box is selected even though I never touched it in the recording.



Looking at the log results in testcomplete, I see an error that says the window was destroyed during method execution.  How do I get testcomplete to click on the actual button, and not prompt this error message?



Thanks,

Justin

4 Replies


  • Hi Justin,





    As far as I understand, you have a standard open dialog. If so, I recommend that you use the OpenFile method to automate the opening process (see the "OpenFile Method" help topic). 





    If this is not applicable for your, please zip your entire project suite folder along with the log of the failed test execution and send us the archive via our Contact Support form:

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





    Please make sure that the latest log of the failed test execution corresponds to the latest version of your test (there have been no modifications in the test since the last test log was generated).
  • jlui's avatar
    jlui
    Occasional Contributor
    Upon converting my keyword text to a script, I see it OpenFile method is being called:



    optpcs["dlgOpen"]["OpenFile"]("C:\\TTS\\TestCases\\Testing\\SitePlan\\Asset_Siteplan_Csv.csv", "All Files (*.*)");



    I have tried removing the "All Files" argument in the method.  This prevents that dropdown from being selected during playback, but I still get that window was destroyed message regardless.



    When you say zip up my project file, do you mean all the files that are specified in the attached image?
  • Hi Justin,



    but I still get that window was destroyed message regardless


    We need to see your project suite with logs. Can you zip the entire project suite directory and send it to us?



    do you mean all the files that are specified in the attached image?


    Exactly.

  • jlui's avatar
    jlui
    Occasional Contributor
    Hello, I was able to find a way of opening the file w/o using the OpenFile method.  I had tc record a keystroke and it did what I wanted to do.



    Thanks for the help.