How to get dialog box exist or not

4 posts, 0 answers
  1. Chandrasekhar
    Chandrasekhar avatar
    7 posts
    Member since:
    Apr 2013

    Posted 30 Apr 2013 Link to this post

    Hi,

    I want to check a condition weather dialog box exist or not.

        If (the dialog box exists) then 
            i need to click on yes button
        Else
            No action

    plz provide code to do this
       
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 30 Apr 2013 Link to this post

    Hi Chandrasekhar,

    Unfortunately this cannot be done with a logical If/Else statement. 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. To overcome this, 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. Alan
    Alan avatar
    6 posts
    Member since:
    Aug 2011

    Posted 09 May 2013 Link to this post

    This worked perfectly for our application...we had to use the LogonDialog class instead of the AlertDialog class.  Thanks for the help!
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 09 May 2013 Link to this post

    Hi Alan,

    I am glad to hear you got it working! Thanks for the update.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top