How to check any model/ dialog window foreground

2 posts, 0 answers
  1. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 24 Jun 2015 Link to this post

    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

  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 29 Jun 2015 Link to this post

    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!
Back to Top