This is a migrated thread and some comments may be shown as answers.

How to check any model/ dialog window foreground

1 Answer 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
VVP
Top achievements
Rank 2
VVP asked on 24 Jun 2015, 10:00 AM

Hi,

 

In my project, sometimes there are model and non model dialogs which keeps appearing on specific scenarios.

But the problem is sometimes we observed that, they dont get closed and leads to failure in other steps.

How to check whether any dialog / window is foreground?

I checked below options .None seems to work fine.

Manager.Current.ActiveBrowser.IsIEDialog

Manager.Current.ActiveBrowser.IsFrame

Manager.ActiveBrowser.Window.IsForegroundWindow

 Can anyone shed light to possible solutions.

Thanks,

VVP

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 29 Jun 2015, 06:20 AM
Hi Vishnu,

Are those dialog expected or not? Do you want to handle them?

If you just want to close them you can set in a coded step:

Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;

All dialogs which do not have handle step in the test will be closed.

Let me know if this helps.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
VVP
Top achievements
Rank 2
Answers by
Boyan Boev
Telerik team
Share this question
or