Test Studio Runner Crashes when trying to handle download dialog

4 posts, 1 answers
  1. April
    April avatar
    10 posts
    Member since:
    Oct 2016

    Posted 06 Jun 2019 Link to this post

    I attached a screenshot of the error when prompted to debug.

    In the log, there is an exception at the very bottom which I've pasted below:

    [06/06 08:54:48,ArtOfTest.Runner.exe(6748:13),DialogPlayback] DialogMonitor.OnWindowCreated() : New dialog detected (ClassName = "#32770", Handle = "1246402").
    [06/06 08:54:48,ArtOfTest.Runner.exe(6748:13),DialogPlayback] DialogMonitor.HandleDialogWindow() : Closing orphaned LogonDialog.
    [06/06 08:55:40,Telerik.TestStudio.Desktop.exe(196:28)] First trace message from pool unnamed thread (managed ID = 28, native ID = 8120).
    [06/06 08:55:40,Telerik.TestStudio.Desktop.exe(196:28),WebExtension] ExecutionMediator.OnMessageReceived() : 06/06/2019 08:55:40.683 - [INFO - BACKGROUND] Tab onRemoved: removed tab id '4'
    [06/06 08:55:40,Telerik.TestStudio.Desktop.exe(196:12),Recording] <>c__DisplayClass66_0.<InvokeOnUIThread>b__0() : EXCEPTION! (see below)
         Outer Exception Type: System.Collections.Generic.KeyNotFoundException
         Message: The given key was not present in the dictionary.
         HRESULT: 0x80131577 (Official ID (if app.) = COR_E_KEYNOTFOUND, Error Bit = FAILED, Facility = FACILITY_URT, Code = 5495)
         Call Stack:
              at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
              at Telerik.TestStudio.Web.JSRecorder.JsRecorderManager.HandlePopupClosed(JToken data, Int32 windowId)
              at Telerik.TestStudio.Web.JSRecorder.JsRecorderManager.UpdateBrowserState(JToken data, Int32 windowId, Int32 tabId)
              at Telerik.TestStudio.Web.JSRecorder.JsRecorderManager.<>c__DisplayClass20_1.<OnMessageReceived>b__6()
              at Telerik.TestStudio.Web.JSRecorder.JsRecorderManager.<>c__DisplayClass66_0.<InvokeOnUIThread>b__0()

    The exception doesn't appear until I close the download dialog or tab manually after moving past the"ArtOfTest.Runner has stopped working" prompt. I noticed that it doesn't even try to fill in the download dialog, too. 

  2. Elena
    Elena avatar
    1188 posts

    Posted 07 Jun 2019 Link to this post

    Hello April,

    I am sorry to hear you have encountered troubles with the dialog handling step and will be happy to assist with that. 

    There are few further details to sort out and will appreciate if you elaborate on the topics below: 
    - the dialog in question seems to be a Logon dialog. Do you have troubles with any other dialogs - alert, confirm, download, etc?
    - the application under test is a web page and you use Chrome or Firefox. Do you see the same misbehavior against IE?
    - do you observe the issue in recording mode (record a whole test scenario or use Run->To Here) or during complete test execution? 
    - if using partial execution (Run->To Here), please try to run the whole test and verify if the misbehavior is the same? 
    - it seems you hadn't troubles with the dialog handling in the past - is this a new application that you need to automate, or there is any recent change in the environment, since which the dialog cannot be handled and the Test Studio Runner crashes? 
    - do you start Test Studio with admin rights? 
    - which is the Test Studio and used browsers versions? 
    - in the error message from the screenshot you have shared, there is listed the option to debug the ArtOfTest.Runner.exe - can you please click that one and share the details from the debugger? 

    I hope that gathering the information above will help us find out what causes the issue. I am looking forward to hearing back from you. 

    Thank you in advance for your time and cooperation. 

    Elena Tsvetkova
    Progress Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. April
    April avatar
    10 posts
    Member since:
    Oct 2016

    Posted 07 Jun 2019 in reply to Elena Link to this post

    • No - not a logon dialog. Its just the download dialog. You can see that when it closes the logon dialog because its finished there. What is essentially happening on the webpage is I'm clicking a download link that requires you to login to verify your identity, so because of the way downloads work it opens in another tab and a login dialog appears. The test logs in successfully but after that when it tries to run the "handle download dialog" step the test studio runner crashes. Its consistent.
    • I use chrome, yes. I tried internet explorer 11 and it didn't crash, but it didn't find the download dialog.
    • I first encountered it in recording mode. I tried it in an execution and it still crashed.
    • Are you talking about a ticket I entered beforehand? It never crashed then - it just never could find the dialog. I remember that being a bugfix to test studio that you put up.
    • I start test studio with admin rights.

    I fooled around a little bit while getting the info you request and it looks like it crashes when trying to connect to the "popup window" that basically only appears because of the logon prompt.. So it doesn't crash the runner anymore which is great, but now the download dialog isn't being handled on chrome or IE. On chrome it looks like it types out the file path to save but then it doesn't save for me. Its a save button and I have it set to save. Here's a screencast of what is happening when it gets to the download dialog on chrome:


    On IE 11 it takes a long time to find the download dialog (so I extended the handle timeout to 30 seconds) - It doesn't seem to want to save here, either. Same sort of behavior as the screencast above. I attached my clean logs if they help.

  4. Answer
    Plamen Mitrev
    Plamen Mitrev avatar
    214 posts

    Posted 12 Jun 2019 Link to this post

    Hello April,

    Please allow me to step in this conversation as my colleague Elena is out of the office today.

    I noticed in the shared video that Test Studio enters a folder name in the File name field. This means that when the test execution wants to handle the dialog with the Save option, it opens the folder and still waits for the file name. What you can do is to add a valid full file path in the Handle Download dialog step (see fullPathDownloadDialog.png). Your account should also have permissions to save files in this location.

    The application log did not show other relevant errors that might be causing this misbehavior. In case the above suggestion does not help you resolve the issue, I will need to test this scenario on my end. Please zip and attach a Test Studio project, which successfully reproduces the misbehavior. In case the application is not publicly accessible, you can try and record a sample project against a public application and check if the download dialog handling work there.

    Thank you for you cooperation in this discussion.

    Plamen Mitrev
    Progress Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top