Skip to content

Commit a4405ba

Browse files
committed
Wait after the proxy dialog closed
1 parent e00289b commit a4405ba

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

ProxyDialogAutoFiller/ProxyDialogAutoFiller.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,11 @@ internal static void LoginToProxy(RuntimeContext context, AutomationElement targ
191191
if (proxyDialogElement != null)
192192
{
193193
context.Logger.Log($"Dialog not closed");
194-
return;
195194
}
196195

197-
if (context.Config?.WarningWhenCloseDialog ?? false)
198-
{
199-
context.Logger.Log($"Display warning dialog");
200-
}
196+
// ユーザー名、パスワードに誤りがあった場合などに、短時間で連続してダイアログの表示とOKが繰り返され、ユーザーが対処できなくなる可能性がある。
197+
// そのため、ここでさらに10秒間待機し、ダイアログが閉じられなかった場合にユーザーがキャンセルや正しいユーザー名、パスワードが入力できるようにする。
198+
Task.Delay(10000).Wait();
201199
}
202200
catch (Exception ex)
203201
{

0 commit comments

Comments
 (0)