Example #1
0
        public HtmlDialogCollection(IntPtr hWnd, bool waitForComplete)
        {
            findBy = Find.Any;
            this.waitForComplete = waitForComplete;
            var iesWindowHelper = new IESWindowHelper(hWnd);

            htmlDialogs = new List <HtmlDialog>();

            var windows = new WindowsEnumerator();
            var popups  = windows.GetWindows(window => NativeMethods.CompareClassNames(window.Hwnd, "Internet Explorer_TridentDlgFrame"));

            foreach (var window in popups)
            {
                if (!iesWindowHelper.IsChildWindow(window))
                {
                    continue;
                }

                var htmlDialog = new HtmlDialog(window.Hwnd);
                htmlDialogs.Add(htmlDialog);
            }
        }
Example #2
0
        /// <inheritdoc />
        public virtual bool CanHandleDialog(Window dialog, IntPtr mainWindowHwnd)
        {
            var iesWindowHelper = new IESWindowHelper(mainWindowHwnd);

            return(iesWindowHelper.IsChildWindow(dialog) && CanHandleDialog(dialog));
        }