WPF - Dialog Box Unexpected unless logging?

3 posts, 0 answers
  1. Mark
    Mark avatar
    2 posts
    Member since:
    Apr 2016

    Posted 27 Apr 2016 Link to this post

    WPF Application Dialog problem

    So I have a bit of a strange problem with my test, so far handling Save As Dialogs have gone well, however this particular Save Dialog is not being 'detected' as a Save As Dialog. The title of the window is "Select an Export File" and my problem occurs when I click on the button to open this window, when it's opened I can see in the log file made by Test Studio that it is considered an "Unexpected Dialog". And then test studio won't handle it as a SaveAsDialog. However, when I set the UnexpectedDialogAction to Handle and Continue, what would be the Save As Dialog box is closed as fast as it is opened and if I open the Save As Dialog box again, then Telerik recognizes it as a Save As Dialog and not an UnexpectedDialog. Where this gets even more complex is when I take off Test Studio logging, the Dialog never changes to a Save As Dialog, and Test studio keeps recognizing it as an unexpected dialog no matter how many times I click on the button that opens this.


    Any ideas on how I can fix this? Very confused about this issue.


    Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;

  2. Mark
    Mark avatar
    2 posts
    Member since:
    Apr 2016

    Posted 29 Apr 2016 Link to this post

    After spending an embarrassing amount of time I'm a bit ashamed to say the solution we used to this problem, we simply just entered the file path we'd like to save to using the keyboard and sent an enter key and that works instead of relying on the SaveAsDialogHandler. Still curious as to why this behaviour occurs with the differences in logging and not logging as well as the box sometimes being considered Unexpected Dialog and Save As Dialog.
  3. Elena
    Elena avatar
    1127 posts

    Posted 02 May 2016 Link to this post

    Hello Mark,

    Thank you for the detailed description. I am glad to hear you were able to figure out and handle the encountered issue. That sounds quite odd but to provide any root cause of that unexpected behavior we will need access to the particular application or a sample one that replicates the same for further investigation. It will be helpful if you are able to grant access to your application and share your project. 

    Do not hesitate to contact us in case of any future queries. 

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