This is a migrated thread and some comments may be shown as answers.
How to get dialog box exist or not
3 Answers 22 Views
This is a migrated thread and some comments may be shown as answers.
Chandrasekhar
Top achievements
Rank 1
Chandrasekhar asked on 30 Apr 2013, 09:34 AM
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
   

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 30 Apr 2013, 09:51 AM
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
0
Alan
Top achievements
Rank 2
answered on 09 May 2013, 02:33 PM
This worked perfectly for our application...we had to use the LogonDialog class instead of the AlertDialog class.  Thanks for the help!
0
Plamen
Telerik team
answered on 09 May 2013, 02:47 PM
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
Asked by
Chandrasekhar
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Alan
Top achievements
Rank 2
Share this question
or