开发者

how to handle the ie.refresh() pop up

开发者 https://www.devze.com 2023-02-05 19:47 出处:网络
i am trying to handle the retry button when triggeringie.refresh().this is what i have so far ConfirmDialogHandler confirm = new ConfirmDialogHandler();

i am trying to handle the retry button when triggering ie.refresh(). this is what i have so far

                    ConfirmDialogHandler confirm = new ConfirmDialogHandler();
                    using (new UseDialogOnce(ie.DialogWatcher, confirm))
                    {
                        ie.Refresh();
                        confirm.WaitUntilExists();
                        confirm.OKButton.Click();
                        ie.WaitForComplete(开发者_运维知识库);
                    }

but it does't work as expected. thanks


after more digging i found RefreshWarningDialogHandler, this should do it;...thanks though

yep it it works, heres the solution i used. i hope it helps someone who may have also had this issue.

                    bool retryhandler = true;
                    RefreshWarningDialogHandler refresh = new RefreshWarningDialogHandler(retryhandler);
                   using (new UseDialogOnce(ie.DialogWatcher,refresh))
                   {
                       ie.Refresh();
                   }
                    ie.WaitForComplete();
0

精彩评论

暂无评论...
验证码 换一张
取 消