Unexpected Dialog Handling

6 posts, 1 answers
  1. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 07 Mar 2013 Link to this post

    Hi ! I have an issue in my Web Test (For Silverlight powered site). 

    After a particular step, there is a Dialog box popping up and hence the whole test fails. Big problem is the occurrence of Dialog box is not constant. So can I create an If-Else loop likewise to handle this.

    So if I place the If-Else loop after the particular step, If the dialog box comes, It has to click ok and Continue, or else it has to proceed as usual. Can anyone help me in regard of this...? Thank you...

    I hope I made my problem clear. If not, Let me know. I can explain More...

    P.S: I know exactly after which step the dialog may popup. 
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 07 Mar 2013 Link to this post

    Hello Aswin,

    I am sorry to hear you are running into this problem. Unfortunately a standard IF/ELSE logical step added through the UI will not work in this case. This can be done in a coded step however. Please see this article on "Conditional Dialog Handling" and let me know if you need further assistance on this.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Aswin
    Aswin avatar
    18 posts
    Member since:
    Feb 2013

    Posted 07 Mar 2013 Link to this post

    Thanks for the Reply. But the action that potentially triggers the dialog is not available. I don't know why it arises. Moreover this testing is for Silverlight app embedded site and thus making it more complicated to Handle. It'll be wonderful if UI has a solution or Work-Around something like that.
  4. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 11 Mar 2013 Link to this post

    Hi Aswin,

    Unfortunately as I stated before conditional dialog handling can only be done in code. The problem is that the test displays the dialog before it enters the If/Else statement. The Dialog Handler isn't created until the branch is made and since the dialog is displayed before the dialog handler is created, it will never know that the dialog exists.

    One thing you can try however is to set the UnexpectedDialogAction property to HandleAndContinue. This should handle all unexpected dialogs automatically when they show up.  

    In order to set this property when executing from 'Quick Execution', you can override it in a coded step like this:
    Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;


    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Ola
    Ola avatar
    5 posts
    Member since:
    Sep 2017

    Posted 22 Sep 2017 Link to this post

    I know this is an old thread but i found in on the web search for a solution, I am having an error involving an unexpected dialoge according to the error report.

    I tried the line of code mentioned, but it doesn't work.

    I am new, and just trying to run the sample project called htmlcontrols.cs, where is this files, from the telerik sample should i place the code, or is it irrelevant

     

    Thanks

  6. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 27 Sep 2017 Link to this post

    Hi Ola,

    Please provide a sample testing project on a public facing application that reproduce this problem to investigate further.

    Thank you in advance for your cooperation.

    Best Regards,
    Nikolay Petrov
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top