cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to know which dialog pop ups from set of dialog, after a particular action?

SOLVED
Highlighted
Contributor

Is there a way to know which dialog pop ups from set of dialog, after a particular action?

Hi,

 

I have a test case in which a dialog gets launched after clicking a button.

This dialog may not be same everytime. ( There is set of 5 dialogs from which a dialog is picked.)

 

I want to find out which dialog is launched after the click. So is there a way to know which object is launched ? to understand dialog name.

 

I used below code.

 

button.Click()

if(dialog1.Exists)

log.message("1dialog")

if(dialog2.Exists)

if(dialog3.Exists)

log.message("3 dialog")

if(dialog4.Exists)

log.message("4 dialog")

if(dialog5.Exists)

log.message("5 dialog")

 

This is time consuming when last dialog is launched as it will check for all dialog. 

Is there any method to know which object is launched after clicking the botton without checking every object.

   

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Is there a way to know which dialog pop ups from set of dialog, after a particular action?

You can control the amount of time it checks for each dialog by using judicious placements of "WaitChild" or "WaitAliasChild" to wait for the dialog.  Those methods have a timeout setting that you can set to a max level.  That way, rather than waiting for the global project level timeout, you can customize it based upon expected timeout for each dialog.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
2 REPLIES 2
Community Hero

Re: Is there a way to know which dialog pop ups from set of dialog, after a particular action?

Hi,

 

> is there a way to know which object is launched ?

No way, unless your tested application provides some info about this.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Hero

Re: Is there a way to know which dialog pop ups from set of dialog, after a particular action?

You can control the amount of time it checks for each dialog by using judicious placements of "WaitChild" or "WaitAliasChild" to wait for the dialog.  Those methods have a timeout setting that you can set to a max level.  That way, rather than waiting for the global project level timeout, you can customize it based upon expected timeout for each dialog.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors