how to handle the ie.refresh() pop up
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();
精彩评论