麻烦各位懂WatiN的帮小弟我看看这个有关问题如何解决

麻烦各位懂WatiN的帮我看看这个问题怎么解决
我现在要用WatiN测试一个用例,直接输入url跳转到的页面会自动弹出登录框,我代码是这样写的
  broswer=new IE();
  broswer .GoTo(fileAgent.globalWebDiagnosticsURL + "/admin_hosts.asp");
  // broswer.WaitForComplete(3);
  LogonDialogHandler ldhl = new LogonDialogHandler("admin", "admin");
  IntPtr hwnd = GetActiveWindow();

  bool caseTempValue = false;
  Window newDialog = new Window(hwnd);
  caseTempValue = ldhl.IsLogonDialog(newDialog);
  if (caseTempValue)
  {
  caseResult = true;
  caseException = "Input URL directly,need input user and password";
  broswer.DialogWatcher.Add(ldhl);
  broswer.WaitForComplete(10);
  }
  else
  {
  caseException = "The test case failed, Input URL can navigate to admin page directlly";
现在问题是第一步broswer.goto过后,IE中的登录框自动会关闭,跳到登陆失败的那个页面,如果用点击登录的话可以用clicknowait让它停在登录框的页面,但是直接用goto的话不知道怎么样让程序不需要返回值,停在登录页面。

------解决方案--------------------
好像还是没看明白,是不是登陆后当前页面会自动关闭,然后弹出一个新的页面?
这种的话可以这样使用
C# code

ie = new IE("about:blank");
ie.ShowWindow(NativeMethods.WindowShowStyle.Maximize);
ie.TextField(Find.ByName("user")).Value = "UserName";
ie.TextField(Find.ByName("passwd")).Value = "PassWord";
ie.Button(Find.ByName("btnSubmit")).ClickNoWait();

ie = IE.AttachToIE(Find.ByTitle("新弹出页面的title"));
ie.WaitForComplete();